Method MoveTowards
- Namespace
- Box3D
- Assembly
- Box3D.NET.dll
MoveTowards(Vector3, Quaternion, float, bool)
Sets the velocity needed to arrive at a target pose after one time step.
public void MoveTowards(Vector3 position, Quaternion rotation, float timeStep, bool wake = true)Parameters
positionVector3-
The target world position.
rotationQuaternion-
The target world rotation.
timeStepfloat-
The time step the velocity is computed for.
wakebool-
Whether to wake the body if the movement is significant.
Remarks
This is how to drive a kinematic body such as a moving platform: it keeps a real velocity, so contacts push other bodies correctly, which a teleport does not.