UTIL ScaleForGravity: Difference between revisions

From Valve Developer Community
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 {{game name|tf2|name=Team Fortress 2}} the formula is <code>desiredGravity / ({{ent|sv_gravity}} * TFGameRules()->GetGravityMultiplier())</code>.
{{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

English (en)Translate (Translate)

Stub

This article or section is a stub. You can help by expanding it.

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 Team Fortress 2 the formula is desiredGravity / (sv_gravity * TFGameRules()->GetGravityMultiplier()).

Declaration

float UTIL_ScaleForGravity( float desiredGravity );

Examples

Todo: Add examples.