Method AddBox
- Namespace
- Box3D
- Assembly
- Box3D.NET.dll
AddBox(Box, ShapeDefinition?)
Attaches a box to this body.
public Shape AddBox(Box box, ShapeDefinition? definition = null)Parameters
boxBox-
The box, in body-local space.
definitionShapeDefinition?-
The shape settings, or null for the defaults.
Returns
- Shape
-
The new shape.
Examples
body.AddBox(Box.Cube(0.5f));
body.AddBox(new Box(new Vector3(50.0f, 0.5f, 50.0f)));
Remarks
The box is a convex hull underneath, but it is self-contained, so nothing needs to be released afterwards.