The Collider class in the Sandbox namespace is an abstract class that serves as a base for all collider components in a scene. It provides properties and methods to interact with the physics system, allowing for collision detection and response.
The Collider class in the Sandbox namespace is an abstract class that serves as a base for all collider components in a scene. It provides properties and methods to interact with the physics system, allowing for collision detection and response.
Member Name | Summary |
---|---|
OnPhysicsChanged | Obsolete. Called when the physics properties of the collider change. |
GetVelocityAtPoint | Get the velocity of this collider at the specific point in world coordinates. |
FindClosestPoint | Returns the closest point to the given one between all convex shapes of this body. |
KeyframeBody | Gets the keyframe body associated with this collider. |
Static | Indicates whether the collider is static. |
IsConcave | Indicates whether the collider is concave. |
IsDynamic | Return 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 then this will return the component that it's attached to. If this is null it's usually a good indication that this collider is either static, world geometry, or a keyframe. |
Friction | Allows overriding the friction for this collider. This value can exceed 1 to give crazy grippy friction if you want it to, but the normal value is between 0 and 1. |
Surface | Gets or sets the surface properties of the collider. |
SurfaceVelocity | Set the local velocity of the surface so things can slide along it, like a conveyor belt. |
IsTrigger | Indicates whether the collider is a trigger. |
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 | If we're a trigger, this will list all of the colliders that are touching us. If we're not a trigger, this will list all of the triggers that we are touching. |
This class does not have any derived types listed.