This component is an encapsulation of the Collider and Collider2D components, containing the most commonly used properties and methods from these components.
More...
|
delegate void | PenetrationDelegate (ref Vector3 bodyPosition, ref Quaternion bodyRotation, Transform otherColliderTransform, Vector3 penetrationDirection, float penetrationDistance) |
|
abstract bool | ComputePenetration (ref Vector3 position, ref Quaternion rotation, PenetrationDelegate Action) |
| Calcules the amount of penetration between this body and nearby neighbors. Alternatively, an action (delegate) can be passed in, so the resulting position/rotation can be modified if needed. More...
|
|
abstract Vector3 | ComputePenetrationVector (ref Vector3 position, ref Quaternion rotation, PenetrationDelegate Action) |
| Calcules the amount of penetration between this body and nearby neighbors. Alternatively, an action (delegate) can be passed in, so the resulting position/rotation can be modified if needed. More...
|
|
abstract int | OverlapBody (Vector3 position, Quaternion rotation) |
| Performs an overlap check using the body shape. The filter used in this case corresponds to the internal one from the PhysicsBody2D/3D class. If a custom filter is required, 2D/3D implementations must be used instead. More...
|
|
|
static ColliderComponent | CreateInstance (GameObject gameObject, bool includeChildren=true) |
|
|
abstract void | OnEnable () |
|
abstract void | OnDisable () |
|
virtual void | Awake () |
|
|
abstract Vector3 | Size [get, set] |
| The size of the collider.
|
|
abstract Vector3 | Offset [get, set] |
| The distance between the center of the collider and the position of the object.
|
|
abstract Vector3 | BoundsSize [get] |
| The collider bounding volume.
|
|
Vector3 | Center [get] |
|
This component is an encapsulation of the Collider and Collider2D components, containing the most commonly used properties and methods from these components.
◆ ComputePenetration()
abstract bool Lightbug.Utilities.ColliderComponent.ComputePenetration |
( |
ref Vector3 |
position, |
|
|
ref Quaternion |
rotation, |
|
|
PenetrationDelegate |
Action |
|
) |
| |
|
pure virtual |
Calcules the amount of penetration between this body and nearby neighbors. Alternatively, an action (delegate) can be passed in, so the resulting position/rotation can be modified if needed.
- Parameters
-
position | The position reference. |
rotation | The rotation reference. |
Action | This delegate will be called after the penetration value is calculated. |
- Returns
- True if there was any valid overlap.
Implemented in Lightbug.Utilities.ColliderComponent2D, and Lightbug.Utilities.ColliderComponent3D.
◆ ComputePenetrationVector()
abstract Vector3 Lightbug.Utilities.ColliderComponent.ComputePenetrationVector |
( |
ref Vector3 |
position, |
|
|
ref Quaternion |
rotation, |
|
|
PenetrationDelegate |
Action |
|
) |
| |
|
pure virtual |
Calcules the amount of penetration between this body and nearby neighbors. Alternatively, an action (delegate) can be passed in, so the resulting position/rotation can be modified if needed.
- Parameters
-
position | The position reference. |
rotation | The rotation reference. |
Action | This delegate will be called after the penetration value is calculated. |
- Returns
- The penetration vector.
Implemented in Lightbug.Utilities.ColliderComponent2D, and Lightbug.Utilities.ColliderComponent3D.
◆ OverlapBody()
abstract int Lightbug.Utilities.ColliderComponent.OverlapBody |
( |
Vector3 |
position, |
|
|
Quaternion |
rotation |
|
) |
| |
|
pure virtual |
The documentation for this class was generated from the following file:
- C:/Unity/Projects/CCP v1/Assets/Character Controller Pro/Main/Utilities/Scripts/ColliderComponent.cs