Help with Enemy Death Animation
I'm currently developing 3D TPS game where after a set number of shots, the enemy dies. Pretty simple.
Once the enemy gets killed, he is supposed to perform a death animation where the enemy fall backward. And he is doing so. The real problem comes after that.
Everything was performing nicely until I added a script for the enemy to chase the player once the player gets close enough. What happened is that some enemies would walk through walls so I attached a Rigidbody on them to avoid that. To have no problems with him flying or going to weird directions, I freeze his rotations and his Y position.
And now when the death animation plays, he will perform the falling animation but after the animation ends, it will show up like he is flying. Like he was rotating around a fixed center.
I think the problem is because his collider is still in standing position and touching the ground or because of the freezes, but I don't know how to solve that problem. Its my first time asking questions here so I don't know if this is enough information on my problem, let me know if I missed some important info about it.
Your answer
Follow this Question
Related Questions
Is there a way to limit animation on collision? 1 Answer
Animation flipped in wrong direction? 1 Answer
Rigidbody Unwanted Drift 1 Answer