approachVelocity
approachVelocity(
current,target,acceleration,deceleration,dt):object
Defined in: gameplay/ThirdPersonController.ts:132
Move a horizontal velocity toward what was asked for. Accelerating and stopping are separate rates because a character that coasts to a halt as slowly as it gets going feels like it is on ice.
Parameters
Section titled “Parameters”current
Section titled “current”number
number
target
Section titled “target”number
number
acceleration
Section titled “acceleration”number
deceleration
Section titled “deceleration”number
number
Returns
Section titled “Returns”object
x:
number
z:
number