- Home /
Ragdoll bouncing towards the initial position after disabling animation
I'm new to unity, so I may be missing something simple.
I'm trying to turn an enemy into a ragdoll upon death, using the recommended method I've seen elsewhere: at the start, turning the ragdoll's rigidbodies kinematic, and when the enemy's health drops below 0 re-enabling them and disabling the animation. This was very close to working, but I've noticed that the moment the rigidbodies stop being kinematic they sort of "bounce" back into the position they were in in the editor - they don't snap right there, but they are given a certain speed in that direction. The further away the model during the animation is from its initial position, the faster the speed it is given when turning into a ragdoll - to the point where it completely glitches out if it turns into a ragdoll at a weird pose.
I've tried messing around with it but I can't figure out what the problem is. Seems to be something with the animation (maybe a certain setting I'm missing?), but I can't tell more than that. Does anyone know how I could fix this?
Answer by tuinal · Jul 20, 2020 at 04:33 PM
Are the rbs set to interpolate? One possible thing could be, if you're enabling in Update, they're interpolating towards the last FixedUpdate position they were active until FixedUpdate runs.
@tuinal Thanks for the reply! No, they're set to none. Can you elaborate on your thoughts regarding FixedUpdate? Any nudge in the right direction would be appreciated...
Your answer
![](https://koobas.hobune.stream/wayback/20220613003610im_/https://answers.unity.com/themes/thub/images/avi.jpg)