Table of Contents

height2jumpz

fixed height2jumpz(fixed height, fixed gravity)

Description

Converts jump height to JumpZ, assuming specified gravity.

Gravity is specified as acceleration, not as sv_gravity units.

Default gravity is 1.0. Use GetGravityG to retrieve current gravity.

Conversion formula

height = 0.5 * jumpz^2 / gravity

Examples

int jumpz = height2jumpz(8.0, 1.0);
print(s:"To jump 8 mapunits high in normal gravity, you need to set JumpZ to ", f:jumpz);