Prevents fast moving objects from going through colliders by casting a ray backwards after each movement
More...
|
virtual void | Start () |
| On Start we initialize our object More...
|
|
virtual void | Initialization () |
| Grabs the rigidbody and computes the bounds width More...
|
|
virtual void | OnEnable () |
| On Enable, we initialize our last frame position More...
|
|
virtual void | FixedUpdate () |
| On fixedUpdate, checks the last movement and if needed casts a ray to detect obstacles More...
|
|
Prevents fast moving objects from going through colliders by casting a ray backwards after each movement
◆ FixedUpdate()
virtual void MoreMountains.Tools.MMPreventPassingThrough.FixedUpdate |
( |
| ) |
|
|
protectedvirtual |
On fixedUpdate, checks the last movement and if needed casts a ray to detect obstacles
◆ Initialization()
virtual void MoreMountains.Tools.MMPreventPassingThrough.Initialization |
( |
| ) |
|
|
protectedvirtual |
Grabs the rigidbody and computes the bounds width
◆ OnEnable()
virtual void MoreMountains.Tools.MMPreventPassingThrough.OnEnable |
( |
| ) |
|
|
protectedvirtual |
On Enable, we initialize our last frame position
◆ Start()
virtual void MoreMountains.Tools.MMPreventPassingThrough.Start |
( |
| ) |
|
|
protectedvirtual |
On Start we initialize our object
◆ _adjustedSmallestBoundsWidth
float MoreMountains.Tools.MMPreventPassingThrough._adjustedSmallestBoundsWidth |
|
protected |
◆ _collider
Collider MoreMountains.Tools.MMPreventPassingThrough._collider |
|
protected |
◆ _lastMovement
Vector3 MoreMountains.Tools.MMPreventPassingThrough._lastMovement |
|
protected |
◆ _lastMovementSquared
float MoreMountains.Tools.MMPreventPassingThrough._lastMovementSquared |
|
protected |
◆ _positionLastFrame
Vector3 MoreMountains.Tools.MMPreventPassingThrough._positionLastFrame |
|
protected |
◆ _rigidbody
Rigidbody MoreMountains.Tools.MMPreventPassingThrough._rigidbody |
|
protected |
◆ _smallestBoundsWidth
float MoreMountains.Tools.MMPreventPassingThrough._smallestBoundsWidth |
|
protected |
◆ _squaredBoundsWidth
float MoreMountains.Tools.MMPreventPassingThrough._squaredBoundsWidth |
|
protected |
◆ ObstaclesLayerMask
LayerMask MoreMountains.Tools.MMPreventPassingThrough.ObstaclesLayerMask |
the layer mask to search obstacles on
◆ SkinWidth
float MoreMountains.Tools.MMPreventPassingThrough.SkinWidth = 0.1f |
the bounds adjustment variable
The documentation for this class was generated from the following file: