Table of Contents

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

position Vector3

The target world position.

rotation Quaternion

The target world rotation.

timeStep float

The time step the velocity is computed for.

wake bool

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.