class
ColliderShape
Represents a single collider shape that can be assigned to a collider.
Public
Constructors
ColliderShape
Methods
~ColliderShape
SetPosition
Position of the collider shape, relative to the parent collider.
GetPosition
SetRotation
Rotation of the collider shape, relative to the parent collider.
GetRotation
SetScale
Scale of the collider shape, relative to the parent collider.
GetScale
SetIsTrigger
Enables/disables a collider as a trigger.
A trigger will not be used for collisions (objects will pass through it), but collision events will still be reported.
GetIsTrigger
SetMass
Determines the mass of the collider shape.
Only relevant if the parent collider is part of a rigidbody. Ultimately this will determine the total mass, center of mass and inertia tensors of the parent rigidbody (if they're being calculated automatically).
GetMass
SetMaterial
Determines the physical material of the collider shape.
The material determines how objects hitting the collider shape.
GetMaterial
SetContactOffset
Determines how far apart do two shapes need to be away from each other before the physics runtime starts generating repelling impulse for them.
This distance will be the sum of contact offsets of the two interacting objects. If objects are moving fast you can increase this value to start generating the impulse earlier and potentially prevent the objects from interpenetrating. This value is in meters. Must be positive and greater than rest offset.
Also see SetRestOffset().
GetContactOffset
SetRestOffset
Determines at what distance should two objects resting on one another come to an equilibrium.
The value used in the runtime will be the sum of rest offsets for both interacting objects. This value is in meters. Cannot be larger than contact offset.
Also see SetContactOffset().
GetRestOffset
SetLayer
Determines the layer of the collider shape.
Layer controls with which shapes will this shape collide.
GetLayer
SetCollisionReportMode
Determines which (if any) collision events are reported.
GetCollisionReportMode
SetShape
Changes or sets the collider shape to a plane.
SetShape
Changes or sets the collider shape to a box.
SetShape
Changes or sets the collider shape to a sphere.
SetShape
Changes or sets the collider shape to a capsule.
SetShape
Changes or sets the collider shape to a mesh.
GetPlaneShapeInformation
Returns information about the plane shape.
Will return default shape information if the current shape is not a plane.
GetBoxShapeInformation
Returns information about the box shape.
Will return default shape information if the current shape is not a box.
GetSphereShapeInformation
Returns information about the sphere shape.
Will return default shape information if the current shape is not a sphere.
GetCapsuleShapeInformation
Returns information about the capsule shape.
Will return default shape information if the current shape is not a capsule.
GetMeshShapeInformation
Returns information about the mesh shape.
Will return default shape information if the current shape is not a mesh.
staticCreatePlane
Creates a new plane collider shape.
staticCreateBox
Creates a new box collider shape.
staticCreateSphere
Creates a new sphere collider shape.
staticCreateCapsule
Creates a new capsule collider shape.
staticCreateMesh
Creates a new mesh collider shape.
staticCreateEmpty
Creates a new collider shape without any shape initialized.
staticGetRttiStatic
Internal
Methods
SetParentCollider
Notifies the shape that the provided colliders owns it.
GetParentCollider
Returns the collider the shape is currently attached to, if any.
SetShapeIndexInParent
Index of the shape in the parent collider.
GetShapeIndexInParent
SetContinuousCollisionDetection
Determines if continuous collision detection is enabled or disabled.
When disabled it prevents fast moving objects from passing through obstacles, at the cost of extra performance.
GetContinuousCollisionDetection
Protected
Methods
UpdateTransform
Updates the local shape transform based on the requested local transform values, and the object the shape is currently attached to.