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
meshCollisionMesh-
The mesh. It is copied into the compound by Box3D.CompoundBuilder.Build.
positionVector3-
Where it goes, in compound-local space.
rotationQuaternion?-
Its orientation, or null for none.
scaleVector3?-
The instance scale, or null for none.
materialPhysicsMaterial?-
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
-
meshis null.