Use this class to pilot a ragdoll on a character that is usually driven by an animator and have it fall elegantly If you have parts of your ragdoll that you don't want to be affected by this script (a weapon for example), just add a MMRagdollerIgnore component to them
More...
|
virtual void | Start () |
| On start we initialize our ragdoller More...
|
|
virtual void | Initialization () |
| Grabs rigidbodies, adds body parts and stores the animator More...
|
|
virtual void | RegisterAnimatorParameters () |
| Registers our animation parameters More...
|
|
virtual void | SetIsKinematic (bool isKinematic) |
| Sets all rigidbodies in the ragdoll to kinematic and stops them from detecting collisions (or the other way around) More...
|
|
virtual void | LateUpdate () |
| On late update, we force our ragdoll elements to sleep and handle blending More...
|
|
virtual void | HandleBlending () |
| Blends between ragdolling and animated and switches to Animated at the end More...
|
|
|
bool | Ragdolling [getset] |
| Use this to get the current state of the ragdoll or to set a new one More...
|
|
Use this class to pilot a ragdoll on a character that is usually driven by an animator and have it fall elegantly If you have parts of your ragdoll that you don't want to be affected by this script (a weapon for example), just add a MMRagdollerIgnore component to them
◆ RagdollStates
The possible states of the ragdoll :
- animated : driven by an animator controller, rigidbodies asleep
- ragdolling : full ragdoll mode, purely physics driven
- blending : transitioning between ragdolling and animated
Enumerator |
---|
Animated | |
Ragdolling | |
Blending | |
◆ ForceRigidbodiesToSleep()
virtual void MoreMountains.Tools.MMRagdoller.ForceRigidbodiesToSleep |
( |
| ) |
|
|
virtual |
Forces all rigidbodies in the ragdoll to sleep
◆ HandleBlending()
virtual void MoreMountains.Tools.MMRagdoller.HandleBlending |
( |
| ) |
|
|
protectedvirtual |
Blends between ragdolling and animated and switches to Animated at the end
◆ Initialization()
virtual void MoreMountains.Tools.MMRagdoller.Initialization |
( |
| ) |
|
|
protectedvirtual |
Grabs rigidbodies, adds body parts and stores the animator
◆ LateUpdate()
virtual void MoreMountains.Tools.MMRagdoller.LateUpdate |
( |
| ) |
|
|
protectedvirtual |
On late update, we force our ragdoll elements to sleep and handle blending
◆ RegisterAnimatorParameters()
virtual void MoreMountains.Tools.MMRagdoller.RegisterAnimatorParameters |
( |
| ) |
|
|
protectedvirtual |
Registers our animation parameters
◆ SetIsKinematic()
virtual void MoreMountains.Tools.MMRagdoller.SetIsKinematic |
( |
bool |
isKinematic | ) |
|
|
protectedvirtual |
Sets all rigidbodies in the ragdoll to kinematic and stops them from detecting collisions (or the other way around)
- Parameters
-
◆ Start()
virtual void MoreMountains.Tools.MMRagdoller.Start |
( |
| ) |
|
|
protectedvirtual |
On start we initialize our ragdoller
◆ _animator
Animator MoreMountains.Tools.MMRagdoller._animator |
|
protected |
◆ _animatorParameters
HashSet<int> MoreMountains.Tools.MMRagdoller._animatorParameters |
|
protected |
◆ _bodyparts
◆ _getUpFromBackAnimationParameter
int MoreMountains.Tools.MMRagdoller._getUpFromBackAnimationParameter |
|
protected |
◆ _getUpFromBackAnimationParameterName
const string MoreMountains.Tools.MMRagdoller._getUpFromBackAnimationParameterName = "GetUpFromBack" |
|
staticprotected |
◆ _getUpFromBellyAnimationParameter
int MoreMountains.Tools.MMRagdoller._getUpFromBellyAnimationParameter |
|
protected |
◆ _getUpFromBellyAnimationParameterName
const string MoreMountains.Tools.MMRagdoller._getUpFromBellyAnimationParameterName = "GetUpFromBelly" |
|
staticprotected |
◆ _mecanimToGetUpTransitionTime
float MoreMountains.Tools.MMRagdoller._mecanimToGetUpTransitionTime = 0.05f |
|
protected |
◆ _ragdolledFeetPosition
Vector3 MoreMountains.Tools.MMRagdoller._ragdolledFeetPosition |
|
protected |
◆ _ragdolledHeadPosition
Vector3 MoreMountains.Tools.MMRagdoller._ragdolledHeadPosition |
|
protected |
◆ _ragdolledHipPosition
Vector3 MoreMountains.Tools.MMRagdoller._ragdolledHipPosition |
|
protected |
◆ _ragdollingEndTimestamp
float MoreMountains.Tools.MMRagdoller._ragdollingEndTimestamp = -100f |
|
protected |
◆ _rigidbodies
Component [] MoreMountains.Tools.MMRagdoller._rigidbodies |
|
protected |
◆ _rigidbodiesTempList
List<Component> MoreMountains.Tools.MMRagdoller._rigidbodiesTempList |
|
protected |
◆ CurrentState
the current state of the ragdoll
◆ ForceSleep
bool MoreMountains.Tools.MMRagdoller.ForceSleep = true |
if this is true, all rigidbodies will be forced to sleep every frame
◆ MainRigidbody
Rigidbody MoreMountains.Tools.MMRagdoller.MainRigidbody |
The rigidbody attached to the main body part of the ragdoll (usually the Pelvis)
◆ RagdollToMecanimBlendDuration
float MoreMountains.Tools.MMRagdoller.RagdollToMecanimBlendDuration = 0.5f |
the duration in seconds it takes to blend from Ragdolling to Animated
◆ Ragdolling
bool MoreMountains.Tools.MMRagdoller.Ragdolling |
|
getset |
Use this to get the current state of the ragdoll or to set a new one
The documentation for this class was generated from the following file:
- E:/Github/Store/HighroadEngine/Assets/HighroadEngine/MMTools/Tools/MMAnimation/MMRagdoller.cs