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. This class provides various properties and methods to interact with the physics engine, allowing for dynamic and static physics interactions.

Members

Properties

Member NameSummary
KeyframeBodyGets the physics 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.
RigidbodyReturns the Rigidbody component this collider is attached to, if any.
FrictionOverrides the friction for this collider, with values typically between 0 and 1.
SurfaceGets or sets the surface properties of the collider.
SurfaceVelocitySets the local velocity of the surface for sliding effects.
IsTriggerIndicates if the collider is a trigger.
LocalBoundsCalculated local bounds of all physics shapes in this collider.
OnTriggerEnterEvent called when a collider enters this trigger.
OnTriggerExitEvent called when a collider exits this trigger.
OnObjectTriggerEnterEvent called when a game object enters this trigger.
OnObjectTriggerExitEvent called when a game object exits this trigger.
TouchingLists all colliders touching this trigger or vice versa.

Methods

Member NameSummary
OnPhysicsChangedCalled when the physics properties of the collider change. (Obsolete)
GetVelocityAtPointGets the velocity of the collider at a specific world point.
FindClosestPointReturns the closest point to a given world point on the collider.