Knockback3
Sourceclass Knockback3
Source
real airborneThreshold
Source
If a unit's vertical component is not greater than this, it will not
become airborne. Units per second.
real destroyDestructableHeightThreshold
Source
Below this height, destructables hit may be destroyed.
real destroyDestructableSpeedThreshold
Source
Above this speed, destructables hit will be destroyed.
real elasticityThreshold
Source
If a unit is not falling faster than this, it will not bounce. Units
per second.
real frictionCoefficientGround
Source
Ratio.
string frictionFxPath
Source
real frictionFxThreshold
Source
Above this speed, sliding units will spawn a dust effect.
real gravity
Source
In units per second squared.
real isAirborneThreshold
Source
For the purposes of friction, distinguish a unit which is airborne
versus one which is sliding. Height in units.
real minimumSlideSpeed
Source
Below this speed, sliding units will stop.
real restitutionCoefficientDestructable
Source
real restitutionCoefficientGround
Source
Fraction of velocity retained after colliding with ground/destructable.
function add(unit u, real velocity, 'unknown type'
(the type angle could not be found, the containing package might not be imported) groundAngle, 'unknown type'
(the type angle could not be found, the containing package might not be imported) airAngle)
Source
Apply a knockback vector to unit u. `velocity` is initial speed in units
per second. `groundAngle` and `airAngle` are the direction and trajectory
parameters, respectively. Example:
function add(unit u, 'unknown type'
(the type vec2 could not be found, the containing package might not be imported) target, real groundSpeed)
Source
Apply a knockback vector to unit u. If the unit is stopped, this vector will
throw the unit to the position at vec2 `target`. Along the XY-plane, the
unit will move `groundSpeed` units per second. Note that the more vertical
angle will always be used from the pair of possible trajectories. Example:
function forget(unit u)
Source
Stop tracking unit u. If the unit is middair it will simply stop moving. If the unit is already untracked,
nothing happens.
function getVel(unit u) returns 'unknown type'
(the type vec3 could not be found, the containing package might not be imported)
Source
Getter for the knockback vector on unit u. If the unit is not already tracked, returns (0, 0, 0).
function setVel(unit u, real velocity, 'unknown type'
(the type angle could not be found, the containing package might not be imported) groundAngle, 'unknown type'
(the type angle could not be found, the containing package might not be imported) airAngle)
Source
Setter for the knockback vector on unit u. If the unit is not already tracked, this has the same behavior as
`add`.
interface TerrainZProvider
Source
A vec3 -> real function.
function get('unknown type'
(the type vec3 could not be found, the containing package might not be imported) where) returns real
Source
interface UnitFilter
Source
A unit -> bool function.
function get(unit which) returns boolean
Source
Source
A vec3 -> vec3 closure.
function apply('unknown type'
(the type vec3 could not be found, the containing package might not be imported) vel) returns 'unknown type'
(the type vec3 could not be found, the containing package might not be imported)
Source