Gravity
Jump to navigation
Jump to search
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. Physics objects will settle on the 'floor' no matter which direction it is in.
Note:Z should be negative for downward pull.sv_gravityis used byCGameMovement::AddGravity()to define gravity on players (Todo: and NPCs?).