Types
dynamics: basicsource
Functions
time-to-apex(arg0: float, arg1: float) => intsource
How many ticks it takes to reach the apex of a ballistic trajectory.
time-to-ground(arg0: float, arg1: float, arg2: float) => intsource
How many ticks it takes to reach the ground for a ballistic trajectory.
Variables
Variables
GRAVITY_AMOUNT: unknownsource
GRAVITY_MAX: unknownsource
Types
trajectory: structuresource
Fields
initial-position: vector
initial-velocity: vector
time: float
gravity: meters
Methods
eval-position!(obj: trajectory, time: float, result: vector) => vectorsource
eval-velocity!(obj: trajectory, time: float, result: vector) => vectorsource
Evaluate the velocity of the object at a given time
setup-from-to-duration!(obj: trajectory, from: vector, to: vector, duration: float, grav: float) => nonesource
Set up a trajectory that goes from->to in the given duration
setup-from-to-xz-vel!(obj: trajectory, from: vector, to: vector, xz-vel: float, grav: float) => nonesource
Set up a trajectory that goes from->to with the given velocity
setup-from-to-y-vel!(obj: trajectory, from: vector, to: vector, y-vel: float, grav: float) => nonesource
Set up a trajectory with the given initial y velocity.
setup-from-to-height!(obj: trajectory, arg0: vector, arg1: vector, arg2: float, arg3: float) => nonesource
Setup a trajectory that reaches a given height
debug-draw!(obj: trajectory) => nonesource
Draw the trajectory