Table of Contents

Method CreateStaticBody

Namespace
Box3D
Assembly
Box3D.NET.dll

CreateStaticBody(Vector3, Quaternion?)

Creates an immovable body, for level geometry.

public Body CreateStaticBody(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.

Examples

Body ground = world.CreateStaticBody(new Vector3(0.0f, -0.5f, 0.0f));
ground.AddBox(new Box(new Vector3(50.0f, 0.5f, 50.0f)));