class Collider : Component

book_4_sparkGenerated
code_blocksInput

Description

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.

Members

Instance Members

Member NameSummary
OnPhysicsChangedObsolete. Called when the physics properties of the collider change.
GetVelocityAtPointGet the velocity of this collider at the specific point in world coordinates.
FindClosestPointReturns the closest point to the given one between all convex shapes of this body.
KeyframeBodyGets the keyframe body associated with this collider.
StaticIndicates whether the collider is static.
IsConcaveIndicates whether the collider is concave.
IsDynamicReturn 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 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.
FrictionAllows 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.
SurfaceGets or sets the surface properties of the collider.
SurfaceVelocitySet the local velocity of the surface so things can slide along it, like a conveyor belt.
IsTriggerIndicates whether the collider is a trigger.
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.
TouchingIf 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.

DerivedTypesHtml

This class does not have any derived types listed.