class Collider : Component

robot_2Generated
code_blocksInput

Description

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.

Members

Instance Properties

Member NameSummary
KeyframeBodyGets the keyframe body associated with this collider.
StaticIndicates whether the collider is static.
IsConcaveDetermines if the collider is concave.
IsDynamicReturns true if this collider is using dynamic physics. Returns false if this is a keyframe body, or a static physics body.
RigidbodyIf this collider is part of a Rigidbody, returns the component it is attached to. Null if static, world geometry, or a keyframe.
FrictionAllows overriding the friction for this collider. Values can exceed 1 for high friction, but normally range between 0 and 1.
SurfaceGets or sets the surface type of the collider.
SurfaceVelocitySets the local velocity of the surface for sliding effects, like a conveyor belt.
IsTriggerIndicates if the collider is a trigger.
LocalBoundsCalculated local bounds of all physics shapes in this collider.
OnTriggerEnterCalled when a collider enters this trigger.
OnTriggerExitCalled when a collider exits this trigger.
OnObjectTriggerEnterCalled when a gameobject enters this trigger.
OnObjectTriggerExitCalled when a gameobject exits this trigger.
TouchingLists all colliders touching this trigger, or all triggers this collider is touching.

Instance Methods

Member NameSummary
OnPhysicsChangedObsolete. Called when the physics properties of the collider change.
GetVelocityAtPointGets the velocity of this collider at a specific point in world coordinates.
FindClosestPointReturns the closest point to the given one among all convex shapes of this body.