Table of Contents

Method AddMesh

Namespace
Box3D
Assembly
Box3D.NET.dll

AddMesh(CollisionMesh, Vector3, Quaternion?, Vector3?, PhysicsMaterial?)

Adds a triangle mesh at a transform.

public CompoundBuilder AddMesh(CollisionMesh mesh, Vector3 position, Quaternion? rotation = null, Vector3? scale = null, PhysicsMaterial? material = null)

Parameters

mesh CollisionMesh

The mesh. It is copied into the compound by Box3D.CompoundBuilder.Build.

position Vector3

Where it goes, in compound-local space.

rotation Quaternion?

Its orientation, or null for none.

scale Vector3?

The instance scale, or null for none.

material PhysicsMaterial?

The surface material, or null for the defaults. One material for the whole mesh: a compound stores at most Box3D.Native.Constants.B3_MAX_COMPOUND_MESH_MATERIALS per mesh, and per-triangle materials are better served by a mesh shape outside a compound.

Returns

CompoundBuilder

This builder, so calls can be chained.

Exceptions

ArgumentNullException

mesh is null.