Hi to all,
I’ve a humanoid character animated by Unity Animator. For the moment, for test, I’m using mecanim default controller (used in mecanim demo scene).
I need for realistic falls, so I’ve added a ragdoll to my character.
When it has to fall, I simply disable animator and change some ragdoll joint attributes.
Usually the falls are ok, but sometimes (let’s say 1 time over 5-6) the character falls in the infinity (his fall is not blocked by ground).
I’ve noted that the problem is more frequent during jump animation.
What could be the cause?
Where Am I wrong?
void Update()
{
// ....
if ( /*fall condition*/ )
{
Ragdoll( !activeRagdoll );
falling = true;
}
// ....
}
public void Ragdoll( bool activeRagdoll )
{
/* some ragdoll joint adjustment */
/* ... */
/* HERE I DISABLE THE ANIMATOR*/
animator.enabled = !activeRagdoll ;
}