ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:height2jumpz

This is an old revision of the document!


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.

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);
functions/height2jumpz.1499610195.txt.gz · Last modified: 2017/07/09 17:23 by korshun