Character Controller Pro 1.4.11
A 2D/3D character controller asset for Unity.
Lightbug.Utilities.ColliderComponent3D Class Referenceabstract

An implementation of a ColliderComponent for 3D colliders. More...

Inheritance diagram for Lightbug.Utilities.ColliderComponent3D:
Lightbug.Utilities.ColliderComponent Lightbug.Utilities.BoxColliderComponent3D Lightbug.Utilities.CapsuleColliderComponent3D Lightbug.Utilities.SphereColliderComponent3D

Public Member Functions

sealed override 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...
 
override 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...
 
override 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...
 
- Public Member Functions inherited from Lightbug.Utilities.ColliderComponent
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...
 

Protected Member Functions

abstract int InternalOverlapBody (Vector3 position, Quaternion rotation, Collider[] unfilteredResults, List< Collider > filteredResults, OverlapFilterDelegate3D filter)
 
bool InternalHitFilter (RaycastHit raycastHit)
 
bool InternalOverlapFilter (Collider collider)
 
int FilterValidOverlaps (int hits, Collider[] unfilteredOverlaps, List< Collider > filteredOverlaps, OverlapFilterDelegate3D Filter)
 
override void Awake ()
 
override void OnEnable ()
 
override void OnDisable ()
 
abstract void OnEnable ()
 
abstract void OnDisable ()
 
virtual void Awake ()
 

Protected Attributes

Collider collider = null
 

Properties

RaycastHit[] UnfilteredHits = new RaycastHit[20] [get, protected set]
 
List< RaycastHit > FilteredHits = new List<RaycastHit>(10) [get, protected set]
 
Collider[] UnfilteredOverlaps = new Collider[20] [get, protected set]
 
List< Collider > FilteredOverlaps = new List<Collider>(10) [get, protected set]
 
PhysicMaterial Material [get, set]
 
- Properties inherited from Lightbug.Utilities.ColliderComponent
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]
 

Additional Inherited Members

- Static Public Member Functions inherited from Lightbug.Utilities.ColliderComponent
static ColliderComponent CreateInstance (GameObject gameObject, bool includeChildren=true)
 

Detailed Description

An implementation of a ColliderComponent for 3D colliders.

Member Function Documentation

◆ Awake()

override void Lightbug.Utilities.ColliderComponent3D.Awake ( )
inlineprotectedvirtual

◆ ComputePenetration()

override bool Lightbug.Utilities.ColliderComponent3D.ComputePenetration ( ref Vector3  position,
ref Quaternion  rotation,
PenetrationDelegate  Action 
)
inlinevirtual

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
positionThe position reference.
rotationThe rotation reference.
ActionThis delegate will be called after the penetration value is calculated.
Returns
True if there was any valid overlap.

Implements Lightbug.Utilities.ColliderComponent.

◆ ComputePenetrationVector()

override Vector3 Lightbug.Utilities.ColliderComponent3D.ComputePenetrationVector ( ref Vector3  position,
ref Quaternion  rotation,
PenetrationDelegate  Action 
)
inlinevirtual

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
positionThe position reference.
rotationThe rotation reference.
ActionThis delegate will be called after the penetration value is calculated.
Returns
The penetration vector.

Implements Lightbug.Utilities.ColliderComponent.

◆ OnDisable()

override void Lightbug.Utilities.ColliderComponent3D.OnDisable ( )
inlineprotectedvirtual

◆ OnEnable()

override void Lightbug.Utilities.ColliderComponent3D.OnEnable ( )
inlineprotectedvirtual

◆ OverlapBody()

sealed override int Lightbug.Utilities.ColliderComponent3D.OverlapBody ( Vector3  position,
Quaternion  rotation 
)
inlinevirtual

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.

Implements Lightbug.Utilities.ColliderComponent.


The documentation for this class was generated from the following file: