Raised This Month: $51 Target: $400
 12% 

Solved What is the unit of sv_gravity?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-04-2019 , 17:37   What is the unit of sv_gravity?
Reply With Quote #1

Most people know that sv_gravity default value is equal to 800 but what I surely dont know is what is the type of value is this?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 07-07-2019 at 17:35.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-04-2019 , 18:06   Re: What is the unit of sv_gravity?
Reply With Quote #2

I think it's a made-up "unit".
__________________
edon1337 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-04-2019 , 18:27   Re: What is the unit of sv_gravity?
Reply With Quote #3

I can understand it's 800 unit per sec squared

But how is that related to the earth gravity?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-05-2019 , 01:05   Re: What is the unit of sv_gravity?
Reply With Quote #4

The actual units is mostly irrelevant in the game unless your trying to calculate a position or velocity based on free fall. 800 = 100% of "normal" gravity. So, if you set it to 400, it's 50% of normal.

Gravity is a unit of acceleration which is distance divided by time square. On earth, gravity is approximately 9.81 m/s^2. If we assume that 800 is earth gravity (which assumes the original developers also made this assumption) then 800 units is equal to 9.81 m/s^2.
__________________
fysiks is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-05-2019 , 04:18   Re: What is the unit of sv_gravity?
Reply With Quote #5

I just transfered 800 units to meters and earth gravity in game is 20.32 meters/s2
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
thEsp
BANNED
Join Date: Aug 2017
Old 07-05-2019 , 04:44   Re: What is the unit of sv_gravity?
Reply With Quote #6

@Natsheh what algorithm are you using to convert units to meters (in-game) ?
thEsp is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-05-2019 , 05:27   Re: What is the unit of sv_gravity?
Reply With Quote #7

Quote:
Originally Posted by thEsp View Post
@Natsheh what algorithm are you using to convert units to meters (in-game) ?

I found it on the site.
#define UnitsToMeters(%1) (%1 * 0.0254)

I don't know how they got these digits
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 07-05-2019 at 05:37.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-05-2019 , 07:24   Re: What is the unit of sv_gravity?
Reply With Quote #8

I don't think 800 is by any means a logical value related to real life gravity, it's simply a made up value.
You can't transfer "units" to meters, because meter itself is an unit,
Quote:
A unit of measurement is a definite magnitude of a quantity, defined and adopted by convention or by law, that is used as a standard for measurement of the same kind of quantity.
By the way, you can't logically convert m/s^2 to meters, but this isn't a logical game, so okay.

I don't know if this could help you, but let's say we have an unit called OurUnit whose value is 800, and 800 is 9.81 m/s^2 in real life, you can do this:
PHP Code:
#define OurUnitToMeters(%1) (%1 * 0.0122625) 
800 * 0.0122625 = 9.81
__________________

Last edited by edon1337; 07-05-2019 at 07:47.
edon1337 is offline
thEsp
BANNED
Join Date: Aug 2017
Old 07-05-2019 , 07:46   Re: What is the unit of sv_gravity?
Reply With Quote #9

800 * 0.122625 = 98.1
If this applied to the rule of earth gravity, we wouldn't be able to even stand up.
thEsp is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-05-2019 , 07:47   Re: What is the unit of sv_gravity?
Reply With Quote #10

Quote:
Originally Posted by thEsp View Post
800 * 0.122625 = 98.1
If this applied to the rule of earth gravity, we wouldn't be able to even stand up.
My bad, it should be 0.0122625
__________________
edon1337 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode