Character Controller Pro  1.3.8
A 2D/3D character controller asset for the Unity Engine.
Lightbug.Utilities.PhysicsComponent3D Class Reference

An implementation of a PhysicsComponent for 3D physics. More...

Inheritance diagram for Lightbug.Utilities.PhysicsComponent3D:
Lightbug.Utilities.PhysicsComponent

Public Member Functions

override void IgnoreCollision (in HitInfo hitInfo, bool ignore)
 Ignores the collision between this object and some other collider. More...
 
override void IgnoreLayerCollision (int targetLayer, bool ignore)
 Ignores the collision between this object and a layer. More...
 
override void IgnoreLayerMaskCollision (LayerMask layerMask, bool ignore)
 Ignores the collision between this object and a layer mask. More...
 
override bool SimpleRaycast (out HitInfo hitInfo, Vector3 origin, Vector3 castDisplacement, in HitInfoFilter filter)
 Raycast wrapper for 2D/3D physics. More...
 
override int Raycast (out HitInfo hitInfo, Vector3 origin, Vector3 castDisplacement, in HitInfoFilter filter)
 RaycastAll wrapper for 2D/3D physics. More...
 
override int CapsuleCast (out HitInfo hitInfo, Vector3 bottom, Vector3 top, float radius, Vector3 castDisplacement, in HitInfoFilter filter)
 CapsuleCastAll wrapper for 2D/3D physics. More...
 
override int SphereCast (out HitInfo hitInfo, Vector3 center, float radius, Vector3 castDisplacement, in HitInfoFilter filter)
 SphereCastAll wrapper for 2D/3D physics. More...
 
override int BoxCast (out HitInfo hitInfo, Vector3 center, Vector3 size, Vector3 castDisplacement, Quaternion orientation, in HitInfoFilter filter)
 BoxCastAll wrapper for 2D/3D physics. It returns (by reference) the closest hit. More...
 
override int BoxCast (Vector3 center, Vector3 size, Vector3 castDisplacement, Quaternion orientation, in HitInfoFilter filter)
 BoxCastAll wrapper for 2D/3D physics. It doesn't return any particular hit, instead, it updates all the hits from the buffer (HitInfo array). This buffer can be obtained via the HitsBuffer property. More...
 
override bool OverlapSphere (Vector3 center, float radius, in HitInfoFilter filter)
 OverlapSphere wrapper for 2D/3D physics. More...
 
override bool OverlapCapsule (Vector3 bottom, Vector3 top, float radius, in HitInfoFilter filter)
 OverlapCapsule wrapper for 2D/3D physics. More...
 
- Public Member Functions inherited from Lightbug.Utilities.PhysicsComponent
void ClearContacts ()
 

Protected Member Functions

override void Awake ()
 
override void Start ()
 
override LayerMask GetCollisionLayerMask ()
 
override void IgnoreOverlappedColliders (LayerMask ignoredLayerMask)
 
override void GetClosestHit (out HitInfo hitInfo, Vector3 castDisplacement, in HitInfoFilter filter)
 

Properties

Rigidbody Rigidbody = null [get]
 Gets the Rigidbody associated with this object. More...
 
Collider [] Colliders = null [get]
 Gets an array with all the colliders associated with this object. More...
 
- Properties inherited from Lightbug.Utilities.PhysicsComponent
HitInfo [] HitsBuffer = new HitInfo[20] [get, protected set]
 
List< ContactContacts = new List<Contact>(20) [get, protected set]
 Gets a list with all the current contacts. More...
 
List< TriggerTriggers = new List<Trigger>(20) [get, protected set]
 Gets a list with all the current triggers. More...
 
LayerMask CollisionLayerMask = 0 [get, protected set]
 Returns a layer mask with all the valid collisions associated with the object, based on the collision matrix (physics settings). More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Lightbug.Utilities.PhysicsComponent
static PhysicsComponent CreateInstance (GameObject gameObject)
 
- Protected Attributes inherited from Lightbug.Utilities.PhysicsComponent
int hits = 0
 
bool ignoreCollisionMessages = false
 
bool wasKinematic = false
 

Detailed Description

An implementation of a PhysicsComponent for 3D physics.

Member Function Documentation

◆ BoxCast() [1/2]

override int Lightbug.Utilities.PhysicsComponent3D.BoxCast ( out HitInfo  hitInfo,
Vector3  center,
Vector3  size,
Vector3  castDisplacement,
Quaternion  orientation,
in HitInfoFilter  filter 
)
inlinevirtual

BoxCastAll wrapper for 2D/3D physics. It returns (by reference) the closest hit.

Implements Lightbug.Utilities.PhysicsComponent.

◆ BoxCast() [2/2]

override int Lightbug.Utilities.PhysicsComponent3D.BoxCast ( Vector3  center,
Vector3  size,
Vector3  castDisplacement,
Quaternion  orientation,
in HitInfoFilter  filter 
)
inlinevirtual

BoxCastAll wrapper for 2D/3D physics. It doesn't return any particular hit, instead, it updates all the hits from the buffer (HitInfo array). This buffer can be obtained via the HitsBuffer property.

Implements Lightbug.Utilities.PhysicsComponent.

◆ CapsuleCast()

override int Lightbug.Utilities.PhysicsComponent3D.CapsuleCast ( out HitInfo  hitInfo,
Vector3  bottom,
Vector3  top,
float  radius,
Vector3  castDisplacement,
in HitInfoFilter  filter 
)
inlinevirtual

CapsuleCastAll wrapper for 2D/3D physics.

Implements Lightbug.Utilities.PhysicsComponent.

◆ IgnoreCollision()

override void Lightbug.Utilities.PhysicsComponent3D.IgnoreCollision ( in HitInfo  hitInfo,
bool  ignore 
)
inlinevirtual

Ignores the collision between this object and some other collider.

Implements Lightbug.Utilities.PhysicsComponent.

◆ IgnoreLayerCollision()

override void Lightbug.Utilities.PhysicsComponent3D.IgnoreLayerCollision ( int  targetLayer,
bool  ignore 
)
inlinevirtual

Ignores the collision between this object and a layer.

Implements Lightbug.Utilities.PhysicsComponent.

◆ IgnoreLayerMaskCollision()

override void Lightbug.Utilities.PhysicsComponent3D.IgnoreLayerMaskCollision ( LayerMask  layerMask,
bool  ignore 
)
inlinevirtual

Ignores the collision between this object and a layer mask.

Implements Lightbug.Utilities.PhysicsComponent.

◆ OverlapCapsule()

override bool Lightbug.Utilities.PhysicsComponent3D.OverlapCapsule ( Vector3  bottom,
Vector3  top,
float  radius,
in HitInfoFilter  filter 
)
inlinevirtual

OverlapCapsule wrapper for 2D/3D physics.

Implements Lightbug.Utilities.PhysicsComponent.

◆ OverlapSphere()

override bool Lightbug.Utilities.PhysicsComponent3D.OverlapSphere ( Vector3  center,
float  radius,
in HitInfoFilter  filter 
)
inlinevirtual

OverlapSphere wrapper for 2D/3D physics.

Implements Lightbug.Utilities.PhysicsComponent.

◆ Raycast()

override int Lightbug.Utilities.PhysicsComponent3D.Raycast ( out HitInfo  hitInfo,
Vector3  origin,
Vector3  castDisplacement,
in HitInfoFilter  filter 
)
inlinevirtual

RaycastAll wrapper for 2D/3D physics.

Implements Lightbug.Utilities.PhysicsComponent.

◆ SimpleRaycast()

override bool Lightbug.Utilities.PhysicsComponent3D.SimpleRaycast ( out HitInfo  hitInfo,
Vector3  origin,
Vector3  castDisplacement,
in HitInfoFilter  filter 
)
inlinevirtual

Raycast wrapper for 2D/3D physics.

Implements Lightbug.Utilities.PhysicsComponent.

◆ SphereCast()

override int Lightbug.Utilities.PhysicsComponent3D.SphereCast ( out HitInfo  hitInfo,
Vector3  center,
float  radius,
Vector3  castDisplacement,
in HitInfoFilter  filter 
)
inlinevirtual

SphereCastAll wrapper for 2D/3D physics.

Implements Lightbug.Utilities.PhysicsComponent.

Property Documentation

◆ Colliders

Collider [] Lightbug.Utilities.PhysicsComponent3D.Colliders = null
get

Gets an array with all the colliders associated with this object.

◆ Rigidbody

Rigidbody Lightbug.Utilities.PhysicsComponent3D.Rigidbody = null
get

Gets the Rigidbody associated with this object.


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