Class DynamicBone
- Namespace
- DefaultNamespace
- Assembly
- Assembly-CSharp.dll
[AddComponentMenu("Dynamic Bone/Dynamic Bone")]
public class DynamicBone : MonoBehaviour
- Inheritance
-
DynamicBone
- Inherited Members
-
- Extension Methods
-
Constructors
DynamicBone()
Fields
m_BoneTotalLength
public float m_BoneTotalLength
Field Value
- float
m_Colliders
[Tooltip("Collider objects interact with the bones.")]
public List<DynamicBoneColliderBase> m_Colliders
Field Value
- List<DynamicBoneColliderBase>
m_Damping
[Tooltip("How much the bones slowed down.")]
[Range(0, 1)]
public float m_Damping
Field Value
- float
m_DampingDistrib
public AnimationCurve m_DampingDistrib
Field Value
- AnimationCurve
m_DistanceToObject
public float m_DistanceToObject
Field Value
- float
m_DistantDisable
[Tooltip("Disable physics simulation automatically if character is far from camera or player.")]
public bool m_DistantDisable
Field Value
- bool
m_DistantDisabled
public bool m_DistantDisabled
Field Value
- bool
m_Elasticity
[Tooltip("How much the force applied to return each bone to original orientation.")]
[Range(0, 1)]
public float m_Elasticity
Field Value
- float
m_ElasticityDistrib
public AnimationCurve m_ElasticityDistrib
Field Value
- AnimationCurve
m_EndLength
[Tooltip("If End Length is not zero, an extra bone is generated at the end of transform hierarchy.")]
public float m_EndLength
Field Value
- float
m_EndOffset
[Tooltip("If End Offset is not zero, an extra bone is generated at the end of transform hierarchy.")]
public Vector3 m_EndOffset
Field Value
- Vector3
m_Exclusions
[Tooltip("Bones exclude from physics simulation.")]
public List<Transform> m_Exclusions
Field Value
- List<Transform>
m_Force
[Tooltip("The force apply to bones.")]
public Vector3 m_Force
Field Value
- Vector3
m_FreezeAxis
[Tooltip("Constrain bones to move on specified plane.")]
public DynamicBone.FreezeAxis m_FreezeAxis
Field Value
- DynamicBone.FreezeAxis
m_Friction
[Tooltip("How much the bones slowed down when collide.")]
public float m_Friction
Field Value
- float
m_FrictionDistrib
public AnimationCurve m_FrictionDistrib
Field Value
- AnimationCurve
m_Gravity
[Tooltip("The force apply to bones. Partial force apply to character's initial pose is cancelled out.")]
public Vector3 m_Gravity
Field Value
- Vector3
m_Inert
[Tooltip("How much character's position change is ignored in physics simulation.")]
[Range(0, 1)]
public float m_Inert
Field Value
- float
m_InertDistrib
public AnimationCurve m_InertDistrib
Field Value
- AnimationCurve
m_LocalGravity
public Vector3 m_LocalGravity
Field Value
- Vector3
m_ObjectMove
public Vector3 m_ObjectMove
Field Value
- Vector3
m_ObjectPrevPosition
public Vector3 m_ObjectPrevPosition
Field Value
- Vector3
m_ObjectScale
public float m_ObjectScale
Field Value
- float
m_Particles
public List<DynamicBone.Particle> m_Particles
Field Value
- List<DynamicBone.Particle>
m_Radius
[Tooltip("Each bone can be a sphere to collide with colliders. Radius describe sphere's size.")]
public float m_Radius
Field Value
- float
m_RadiusDistrib
public AnimationCurve m_RadiusDistrib
Field Value
- AnimationCurve
m_ReferenceObject
public Transform m_ReferenceObject
Field Value
- Transform
m_Root
[Tooltip("The root of the transform hierarchy to apply physics.")]
public Transform m_Root
Field Value
- Transform
m_Stiffness
[Tooltip("How much bone's original orientation are preserved.")]
[Range(0, 1)]
public float m_Stiffness
Field Value
- float
m_StiffnessDistrib
public AnimationCurve m_StiffnessDistrib
Field Value
- AnimationCurve
m_Time
Field Value
- float
m_UpdateMode
public DynamicBone.UpdateMode m_UpdateMode
Field Value
- DynamicBone.UpdateMode
m_UpdateRate
[Tooltip("Internal physics simulation rate.")]
public float m_UpdateRate
Field Value
- float
m_Weight
Field Value
- float
Methods
AppendParticles(Transform, int, float)
public void AppendParticles(Transform b, int parentIndex, float boneLength)
Parameters
b
Transform
parentIndex
int
boneLength
float
ApplyParticlesToTransforms()
public void ApplyParticlesToTransforms()
CheckDistance()
public void CheckDistance()
FixedUpdate()
public void FixedUpdate()
GetWeight()
Returns
- float
public void InitTransforms()
LateUpdate()
MirrorVector(Vector3, Vector3)
public static Vector3 MirrorVector(Vector3 v, Vector3 axis)
Parameters
v
Vector3
axis
Vector3
Returns
- Vector3
OnDisable()
OnDrawGizmosSelected()
public void OnDrawGizmosSelected()
OnEnable()
OnValidate()
PreUpdate()
ResetParticlesPosition()
public void ResetParticlesPosition()
SetWeight(float)
public void SetWeight(float w)
Parameters
w
float
SetupParticles()
public void SetupParticles()
SkipUpdateParticles()
public void SkipUpdateParticles()
Start()
Update()
UpdateDynamicBones(float)
public void UpdateDynamicBones(float t)
Parameters
t
float
UpdateParameters()
public void UpdateParameters()
UpdateParticles1(float)
public void UpdateParticles1(float timeVar)
Parameters
timeVar
float
UpdateParticles2(float)
public void UpdateParticles2(float timeVar)
Parameters
timeVar
float