Class LocomotionBase
- Namespace
- VoxelPlayground.Ragdoll
- Assembly
- GamePlay.dll
public class LocomotionBase : MonoBehaviour
- Inheritance
-
object
LocomotionBase
- Derived
-
- Extension Methods
-
Fields
cols
Field Value
- Collider[]
groundCheckDist
public float groundCheckDist
Field Value
- float
groundHitInfo
protected RaycastHit groundHitInfo
Field Value
- RaycastHit
groundLayer
public LayerMask groundLayer
Field Value
- LayerMask
height
Field Value
- float
isGhostMove
protected bool isGhostMove
Field Value
- bool
isGrounded
protected bool isGrounded
Field Value
- bool
lastJumpTime
protected float lastJumpTime
Field Value
- float
moveVelocity
protected Vector3 moveVelocity
Field Value
- Vector3
pelvisRbGO
public GameObject pelvisRbGO
Field Value
- GameObject
rbs
Field Value
- Rigidbody[]
Properties
groundHitObject
public GameObject groundHitObject { get; }
Property Value
- GameObject
JustLandedOnGround
public bool JustLandedOnGround { get; }
Property Value
- bool
pelvisRB
public Rigidbody pelvisRB { get; }
Property Value
- Rigidbody
shouldGroundCheck
[ShowInInspector]
public bool shouldGroundCheck { get; set; }
Property Value
- bool
Methods
CheckGround()
public virtual void CheckGround()
CheckGround(Vector3, float, float)
public void CheckGround(Vector3 checkPos, float radius, float checkDis)
Parameters
checkPos Vector3
radius float
checkDis float
FixedUpdate()
protected void FixedUpdate()
Forward()
public virtual Vector3 Forward()
Returns
- Vector3
GetCenterPos()
public virtual Vector3 GetCenterPos()
Returns
- Vector3
GetFeetCenterPos()
public Vector3 GetFeetCenterPos()
Returns
- Vector3
GetHeight()
Returns
- float
GetMoveVelocity()
public virtual Vector3 GetMoveVelocity()
Returns
- Vector3
public virtual Transform GetTransform()
Returns
- Transform
IsGhostMove()
public virtual bool IsGhostMove()
Returns
- bool
IsGrounded()
public virtual bool IsGrounded()
Returns
- bool
IsJumping()
public virtual bool IsJumping()
Returns
- bool
Jump(float)
public virtual void Jump(float force)
Parameters
force float
RotateToDirection(Vector3)
public virtual void RotateToDirection(Vector3 dir)
Parameters
dir Vector3
RotateToDirectionSlerp(Vector3, float)
public void RotateToDirectionSlerp(Vector3 dir, float rate)
Parameters
dir Vector3
rate float
SetCollidersEnable(bool)
public virtual void SetCollidersEnable(bool e)
Parameters
e bool
SetGhostProgress(float, bool)
public virtual void SetGhostProgress(float progress, bool trackback = true)
Parameters
progress float
trackback bool
SetHeight(float)
public virtual void SetHeight(float h)
Parameters
h float
SetMoveVelocity(Vector3)
public virtual void SetMoveVelocity(Vector3 vel)
Parameters
vel Vector3
SetRebalanceEnable(bool)
[Button]
public virtual void SetRebalanceEnable(bool enable)
Parameters
enable bool
ToggleKinematic(bool)
public virtual void ToggleKinematic(bool t)
Parameters
t bool
Events
GroundEvent
public event Action<LocomotionBase, bool> GroundEvent
Event Type
- Action<LocomotionBase, bool>