Skip to main content

dynamics-h​

source

Types​


dynamics​

dynamics: basicsource
Fields​
type: type
name: basic
gravity-max: meters
gravity-length: meters
gravity: vector
gravity-normal: vector
walk-distance: meters
run-distance: meters

Functions​


time-to-apex​

time-to-apex(arg0: float, arg1: float) => intsource

How many ticks it takes to reach the apex of a ballistic trajectory.

time-to-ground​

time-to-ground(arg0: float, arg1: float, arg2: float) => intsource

How many ticks it takes to reach the ground for a ballistic trajectory.

Variables​


*standard-dynamics*​

*standard-dynamics*: dynamicssource

gravity-h​

source

Variables​


GRAVITY_AMOUNT​

GRAVITY_AMOUNT: unknownsource

GRAVITY_MAX​

GRAVITY_MAX: unknownsource

trajectory-h​

source

Types​


trajectory​

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