Enemy keeps falling down

This is a problem i have been working on for a while but i do not know how to fix it. when my enemy hits something he falls down (a.k.a falls on his back) the enemy has a rigid body and box colider. any suggestions on how to fix it?

Fortunately no extra code is required; under the rigid-body component on your character you should see something called “Constraints”. Open up the constraints (click the little arrow) and there should be 6 check boxes. if you don’t want the character to fall on his back then click the Freeze rotation X and Z check-boxes (This means the character should only rotate around the Y axis (Up)). This should lock the character in an upright position.

this is what it should look like on the rigidbody:

Hope this helps :slight_smile: