The Collider class in the Sandbox namespace is an abstract class that represents a physical collider component in a scene. It is used to define the shape and physical properties of an object for collision detection and response.
The Collider class in the Sandbox namespace is an abstract class that represents a physical collider component in a scene. It is used to define the shape and physical properties of an object for collision detection and response.
Member Name | Summary |
---|---|
KeyframeBody | Gets the keyframe body associated with this collider. |
Static | Indicates whether the collider is static. |
IsConcave | Determines if the collider is concave. |
IsDynamic | Returns true if this collider is using dynamic physics. Returns false if this is a keyframe body, or a static physics body. |
Rigidbody | If this collider is part of a Rigidbody, returns the component it is attached to. Null if static, world geometry, or a keyframe. |
Friction | Allows overriding the friction for this collider. Values can exceed 1 for high friction, but normally range between 0 and 1. |
Surface | Gets or sets the surface type of the collider. |
SurfaceVelocity | Sets the local velocity of the surface for sliding effects, like a conveyor belt. |
IsTrigger | Indicates if the collider is a trigger. |
LocalBounds | Calculated local bounds of all physics shapes in this collider. |
OnTriggerEnter | Called when a collider enters this trigger. |
OnTriggerExit | Called when a collider exits this trigger. |
OnObjectTriggerEnter | Called when a gameobject enters this trigger. |
OnObjectTriggerExit | Called when a gameobject exits this trigger. |
Touching | Lists all colliders touching this trigger, or all triggers this collider is touching. |
Member Name | Summary |
---|---|
OnPhysicsChanged | Obsolete. Called when the physics properties of the collider change. |
GetVelocityAtPoint | Gets the velocity of this collider at a specific point in world coordinates. |
FindClosestPoint | Returns the closest point to the given one among all convex shapes of this body. |