C# Class Spine.Unity.Modules.SkeletonRagdoll2D

Inheritance: UnityEngine.MonoBehaviour
Show file Open project: EsotericSoftware/spine-runtimes Class Usage Examples

Public Properties

Property Type Description
disableOtherConstraints bool
disableUpdateBones bool
flipYInitially bool
gravityScale float
rootMass float
spawnKinematic bool

Public Methods

Method Description
Apply ( ) : void

Instantiates the ragdoll simulation and applies its transforms to the skeleton.

GetRigidbody ( string boneName ) : Rigidbody2D
Remove ( ) : void

Removes the ragdoll instance and effect from the animated skeleton.

SetSkeletonPosition ( Vector3 worldPosition ) : void

Set the transform world position while preserving the ragdoll parts world position.

SmoothMix ( float target, float duration ) : Coroutine

Transitions the mix value from the current value to a target value.

Private Methods

Method Description
AttachBoundingBoxRagdollColliders ( Bone b, GameObject go, Skeleton skeleton ) : List
FlipScale ( bool flipX, bool flipY ) : Vector3
GetPropagatedRotation ( Bone b ) : float
OnDrawGizmosSelected ( ) : void
RecursivelyCreateBoneProxies ( Bone b ) : void

Generates the ragdoll simulation's Transform and joint setup.

SmoothMixCoroutine ( float target, float duration ) : IEnumerator
Start ( ) : IEnumerator
UpdateSpineSkeleton ( ISkeletonAnimation animatedSkeleton ) : void

Performed every skeleton animation update to translate Unity Transforms positions into Spine bone transforms.

Method Details

Apply() public method

Instantiates the ragdoll simulation and applies its transforms to the skeleton.
public Apply ( ) : void
return void

GetRigidbody() public method

public GetRigidbody ( string boneName ) : Rigidbody2D
boneName string
return UnityEngine.Rigidbody2D

Remove() public method

Removes the ragdoll instance and effect from the animated skeleton.
public Remove ( ) : void
return void

SetSkeletonPosition() public method

Set the transform world position while preserving the ragdoll parts world position.
public SetSkeletonPosition ( Vector3 worldPosition ) : void
worldPosition UnityEngine.Vector3
return void

SmoothMix() public method

Transitions the mix value from the current value to a target value.
public SmoothMix ( float target, float duration ) : Coroutine
target float
duration float
return UnityEngine.Coroutine

Property Details

disableOtherConstraints public property

public bool disableOtherConstraints
return bool

disableUpdateBones public property

public bool disableUpdateBones
return bool

flipYInitially public property

public bool flipYInitially
return bool

gravityScale public property

public float gravityScale
return float

rootMass public property

public float rootMass
return float

spawnKinematic public property

public bool spawnKinematic
return bool