UTIL ScaleForGravity: Difference between revisions
Jump to navigation
Jump to search

No edit summary |
m (Replaced deprecated {{Game name}} template with {{Software}} counterpart. Action performed by bot) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{lang|UTIL ScaleForGravity|title=<code>UTIL_ScaleForGravity</code>}} | {{lang|UTIL ScaleForGravity|title=<code>UTIL_ScaleForGravity</code>}}{{stub}} | ||
{{ent|UTIL_ScaleForGravity}} is a [[UTIL]] function that returns the passed gravity in relation to the world gravity; the formula used is <code>desiredGravity / {{ent|sv_gravity}}</code>, or for {{ | {{ent|UTIL_ScaleForGravity}} is a [[UTIL]] function that returns the passed gravity in relation to the world gravity; the formula used is <code>desiredGravity / {{ent|sv_gravity}}</code>, or for {{Team Fortress 2|4}} the formula is <code>desiredGravity / ({{ent|sv_gravity}} * TFGameRules()->GetGravityMultiplier())</code>. | ||
==Declaration== | ==Declaration== |
Latest revision as of 07:37, 31 May 2024


UTIL_ScaleForGravity is a UTIL function that returns the passed gravity in relation to the world gravity; the formula used is desiredGravity / sv_gravity
, or for Team Fortress 2 the formula is
desiredGravity / (sv_gravity * TFGameRules()->GetGravityMultiplier())
.
Declaration
float UTIL_ScaleForGravity( float desiredGravity );
Examples
Todo: Add examples.