How to prevent tall cubes from falling.

Hi,

I’m using large thin rectangular (oblong?) cubes for my enemies but when I shoot them, the impact of the physic object makes them fall down. How can I prevent this?

Thanks.

1-2) will make it wiggle a little bit. 3-4) will get rid of all wiggle (as will having no rigidbody, but maybe you want that for enemy movement?):

  1. Increase enemy mass (Unity starts everything as 1Kg. So it’s like hitting foam cubes with lead balls, now.) And/or lower the bullets’ mass.

  2. Lower enemy center of mass: rigidbody.centerOfMass = new Vector3(0,-1,0);. They will act like they have a lead weight on the bottom – wobble and pop back up when hit.

  3. Use a trigger instead of a collider for the bullets (and OnTriggerEnter instead of OnCollisionEnter.)

  4. Check Freeze rotation x,y,z on the enemy rigidbodies.