Gravity: Difference between revisions
Jump to navigation
Jump to search
TomEdwards (talk | contribs) mNo edit summary |
TomEdwards (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
'''Gravity''' in | '''Gravity''' in Source is measured in [[unit]]s/second<sup>2</sup>. The value is defined by '''<code>sv_gravity</code>''', which defaults to 600 in Half-Life 2 (and episodes) and 800 in Valve's other games. | ||
== C++ == | == C++ == |
Revision as of 13:49, 12 June 2009
Gravity in Source is measured in units/second2. The value is defined by sv_gravity
, which defaults to 600 in Half-Life 2 (and episodes) and 800 in Valve's other games.
C++
physenv->SetGravity(Vector &gravityVector)
defines gravity for the VPhysics environment, and can be changed at any time.Note:Z should be negative for downward pull.
Tip:Physics objects will sleep on the 'floor' no matter which direction it is in. However, they will not wake simply if gravity changes.
sv_gravity
is used byCGameMovement::AddGravity()
to define gravity on players (Todo: and NPCs?).