The body to which the shape is added to.
The local bounding sphere radius of this shape.
1
-1
Whether to produce contact forces when in contact with other bodies. Note that contacts will be generated, but they will be disabled.
true
Used by the contact generator to make contacts with other convex polyhedra for example.
The half extents of the box.
Identifier of the Shape.
Optional material of the shape that regulates contact properties.
The type of this shape. Must be set to an int > 0 by subclasses.
Static
idStatic
typesAll the Shape types.
Readonly
BOX: 4BOX
Readonly
COMPOUND: 8COMPOUND
Readonly
CONVEXPOLYHEDRON: 16CONVEXPOLYHEDRON
Readonly
CYLINDER: 128CYLINDER
Readonly
HEIGHTFIELD: 32HEIGHTFIELD
Readonly
PARTICLE: 64PARTICLE
Readonly
PLANE: 2PLANE
Readonly
SPHERE: 1SPHERE
Readonly
TRIMESH: 256TRIMESH
calculateWorldAABB
forEachWorldCorner
Get the box 6 side normals
An array of 6 vectors, to store the resulting side normals in.
Orientation to apply to the normal vectors. If not provided, the vectors will be in respect to the local frame.
Static
calculate
A 3d box shape.
Example