public abstract class Sandbox.Collider : Sandbox.Component
Related Guides
Broader workflow and conceptual references connected to this API.
There are various interfaces that can be given to components for specific purposes.
A trigger is a collider that detects when other physics objects enter or exit it, without blocking their movement. They're useful for things like pickup zones, death planes, checkpoints, and area detection.
The scope based system works by creating a snapshot of a change set when the scope is entered and another one when the scope is disposed of. The system will automatically take care of restoring the state on undo/redo.
The easiest way to add an ActionGraph to your scene is through the Actions Invoker component. Just click Add Component on an object, then you can find it under Actions.
You can create links by adding a NavMeshLink Component to an GameObject.
Constructors
Showing 1 constructors
protected Collider()
No results match this filter.
Methods
Showing 10 methods
protected void CalculateLocalBounds()
protected void ConfigureShapes()
Apply any things that we an apply after they're created
public Vector3 FindClosestPoint(Vector3 worldPoint)
Returns the closest point to the given one between all convex shapes of this body.
public Vector3 GetVelocityAtPoint(Vector3 worldPoint)
Get the velocity of this collider at the specific point in world coordinates.
public BBox GetWorldBounds()
Get the world bounds of this object
public void OnPhysicsChanged()Obsolete
Obsolete: This API member is obsolete.
protected void Rebuild()
protected virtual void RebuildImmediately()
No results match this filter.
Properties
Showing 19 properties
public Sandbox.ColliderFlags Sandbox.Collider.ColliderFlags { get; set; }
Flags that modify the behavior of this collider
public System.Nullable`1<float> Sandbox.Collider.Elasticity { get; set; }
Allows overriding the elasticity for this collider. Controls how bouncy this collider is.
public System.Nullable`1<float> Sandbox.Collider.Friction { get; set; }
Allows overriding the friction for this collider. This value can exceed 1 to to give crazy grippy friction if you want it to, but the normal value is between 0 and 1.
public virtual bool Sandbox.Collider.IsConcave { get; set; }
public bool Sandbox.Collider.IsDynamic { get; set; }
Return true if this collider is using dynamic physics. Returns false if this is a keyframe body, or a static physics body.
public bool Sandbox.Collider.IsTrigger { get; set; }
public System.Collections.Generic.IReadOnlySet`1<Sandbox.Joint> Sandbox.Collider.Joints { get; set; }
If we're a keyframe collider, this is the set of joints attached to us. If we're not then this won't ever return anything.
public Sandbox.PhysicsBody Sandbox.Collider.KeyframeBody { get; set; }Obsolete
Obsolete: We no longer offer a way to get the KeyframeBody. What do you want to do?
public virtual sealed BBox Sandbox.Collider.LocalBounds { get; set; }
Calculated local bounds of all physics shapes in this collider.
public System.Action`1<Sandbox.GameObject> Sandbox.Collider.OnObjectTriggerEnter { get; set; }
Called when a gameobject enters this trigger
public System.Action`1<Sandbox.GameObject> Sandbox.Collider.OnObjectTriggerExit { get; set; }
Called when a gameobject exits this trigger
public System.Action`1<Sandbox.Collider> Sandbox.Collider.OnTriggerEnter { get; set; }
Called when a collider enters this trigger
public System.Action`1<Sandbox.Collider> Sandbox.Collider.OnTriggerExit { get; set; }
Called when a collider exits this trigger
public Sandbox.Rigidbody Sandbox.Collider.Rigidbody { get; set; }
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.
public System.Nullable`1<float> Sandbox.Collider.RollingResistance { get; set; }
Allows overriding the rolling resistance for this collider. Controls how easily rolling shapes (sphere, capsule) roll on surfaces.
public bool Sandbox.Collider.Static { get; set; }
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.Collider |