Skip to content

ShapeInfo

Schema Type: JSON Type: object

No Description Found

type

Type: ShapeType

The type of shape or collider to add. Sphere, box, and capsule colliders are more performant and support collision. Defaults to sphere.

See Definitions/ShapeType

radius

Type: number

The radius of the shape or collider. Defaults to 1 meter. Only used by spheres, capsules, cylinders, hemispheres, hemicapsules, and rings.


height

Type: number

The height of the shape or collider. Defaults to 1 meter. Only used by capsules, cylinders, cones, hemicapsules, and rings.


direction

Type: ColliderAxis

The axis that the shape or collider is aligned with. Defaults to the Y axis (up). The flat bottom of the shape will be pointing towards the negative axis. Only used by capsules, cones, hemispheres, and hemicapsules.

See Definitions/ColliderAxis

innerRadius

Type: number

The inner radius of the shape. Defaults to 0 meters. Only used by cones and rings.


outerRadius

Type: number

The outer radius of the shape. Defaults to 0.5 meters. Only used by cones and rings.


cap

Type: boolean

Whether the shape has an end cap. Defaults to true. Only used by hemispheres and hemicapsules.


size

Type: MVector3

The size of the shape or collider. Defaults to (1,1,1). Only used by boxes.

See Definitions/MVector3

offset

Type: MVector3

The offset of the shape or collider from the object's origin. Defaults to (0,0,0). Supported by all collider and shape types.

See Definitions/MVector3

hasCollision

Type: boolean

Whether the collider should have collision enabled. If false, the collider will be a trigger. Defaults to false. Only supported for spheres, boxes, and capsules.


useShape

Type: boolean or null

Setting this to false will force it to use a collider, and setting to true will force it to use a shape.
Shapes do not support collision and are less performant, but support a wider set of shapes and are required by some components.
If left empty it will defaults to using a shape, unless hasCollision is true in which case it defaults to using a collider.