Table of Contents

Method CreateKinematicBody

Namespace
Box3D
Assembly
Box3D.NET.dll

CreateKinematicBody(Vector3, Quaternion?)

Creates a body the application moves itself, which pushes dynamic bodies without being pushed back.

public Body CreateKinematicBody(Vector3 position = default, Quaternion? rotation = null)

Parameters

position Vector3

The initial world position of the body origin.

rotation Quaternion?

The initial world rotation, or null for none.

Returns

Body

The new body, with no shapes attached yet.

Remarks

Drive it with Box3D.Body.LinearVelocity or Box3D.Body.MoveTowards(System.Numerics.Vector3,System.Numerics.Quaternion,System.Single,System.Boolean) rather than Box3D.Body.SetTransform(System.Numerics.Vector3,System.Nullable{System.Numerics.Quaternion}), so that contacts push other bodies correctly.