Class MotionDetector
- Namespace
- VoxelPlayground.Ragdoll
- Assembly
- GamePlay.dll
public class MotionDetector : MonoBehaviour
- Inheritance
-
object
MotionDetector
- Extension Methods
-
Fields
animationController
public AnimationBase animationController
Field Value
- AnimationBase
balanceSenstiveVectorThreshold
public float balanceSenstiveVectorThreshold
Field Value
- float
balanceVectorThreshold
public float balanceVectorThreshold
Field Value
- float
canStandup
[NonSerialized]
public bool canStandup
Field Value
- bool
characterController
public LocomotionBase characterController
Field Value
- LocomotionBase
disableBalanceFeature
public bool disableBalanceFeature
Field Value
- bool
disableMotionFeature
public bool disableMotionFeature
Field Value
- bool
enableMotionFunction
[NonSerialized]
public bool enableMotionFunction
Field Value
- bool
getupAfterGroundTime
public float getupAfterGroundTime
Field Value
- float
getupBlendTime
public float getupBlendTime
Field Value
- float
headMu
[NonSerialized]
public RagdollMuscle headMu
Field Value
- RagdollMuscle
headMuscle
public Transform headMuscle
Field Value
- Transform
knockoutAccThreshold
public float knockoutAccThreshold
Field Value
- float
knockoutMuscles
public MotionDetector.KnockoutData[] knockoutMuscles
Field Value
- KnockoutData[]
[NonSerialized]
public RagdollMuscle leftFootMu
Field Value
- RagdollMuscle
public Transform leftFootMuscle
Field Value
- Transform
ra
Field Value
- RagdollAnim
[NonSerialized]
public RagdollMuscle rightFootMu
Field Value
- RagdollMuscle
public Transform rightFootMuscle
Field Value
- Transform
spineMu
[NonSerialized]
public RagdollMuscle spineMu
Field Value
- RagdollMuscle
splineMuscle
public Transform splineMuscle
Field Value
- Transform
unknockoutable
[NonSerialized]
public bool unknockoutable
Field Value
- bool
Methods
AddForceToKeyPart(Vector3, ForceMode)
public void AddForceToKeyPart(Vector3 force, ForceMode fm = ForceMode.VelocityChange)
Parameters
force Vector3
fm ForceMode
DisableMotionForAWhile(float)
public void DisableMotionForAWhile(float sec)
Parameters
sec float
EnableMotionFunction(bool)
public void EnableMotionFunction(bool e)
Parameters
e bool
GetFeetCenterPos()
public Vector3 GetFeetCenterPos()
Returns
- Vector3
GetStandState()
public MotionDetector.StandState GetStandState()
Returns
- MotionDetector.StandState
IsGettingUp()
public bool IsGettingUp()
Returns
- bool
IsKnockout()
Returns
- bool
IsKnockoutDown()
public bool IsKnockoutDown()
Returns
- bool
IsUnBalance(out Vector3)
public bool IsUnBalance(out Vector3 pushDir)
Parameters
pushDir Vector3
Returns
- bool
Knockout()
[Button]
public void Knockout()
KnockoutWithForce(RagdollMuscle, Vector3)
public void KnockoutWithForce(RagdollMuscle mu, Vector3 forceDir)
Parameters
mu RagdollMuscle
forceDir Vector3
ProtectMotionFunctionForAWhile(float)
public void ProtectMotionFunctionForAWhile(float sec = 1)
Parameters
sec float
PullMuscle()
Returns
- bool
RawSetStandState(StandState)
public void RawSetStandState(MotionDetector.StandState ss)
Parameters
ss MotionDetector.StandState
SetBalanceMlp(float)
public void SetBalanceMlp(float bm)
Parameters
bm float
SetBalanceState(bool)
public void SetBalanceState(bool senstive)
Parameters
senstive bool
SetKnockMlp(float)
public void SetKnockMlp(float mlp)
Parameters
mlp float
SetRagdollAnimControlEnable(bool)
public void SetRagdollAnimControlEnable(bool value)
Parameters
value bool
Standing()
Returns
- bool
Standup()
[Button]
public void Standup()
Standup(bool)
public void Standup(bool faceDown)
Parameters
faceDown bool
public void StandupImmediatly()
UpdateMotion()
public void UpdateMotion()
Events
KnockoutForLongTimeEvent
public event Action KnockoutForLongTimeEvent
Event Type
- Action
StandChangedEvent
public event Action<bool> StandChangedEvent
Event Type
- Action<bool>
StandStateChangedEvent
public event Action<MotionDetector.StandState> StandStateChangedEvent
Event Type
- Action<MotionDetector.StandState>