- Home /
Apply gravity to enemy objects without Rigidbody (?)
I am trying to have my enemy game objects grounded, but using Rigidbodies only gives me problems. If the enemy has a mesh collider on them, as opposed to a capsule, sphere, etc. they just fall through my terrain. This problem on its own could be fixed, I realize that, but even if the enemies didn't fall straight through the ground (i.e. if I just applied a simple, loosely fitting capsule collider on them), they would fall over whenever they reached an incline in the terrain, which simply will not do.
Is there any way for my enemies to have a collider (preferably mesh) and not fall all over the place (i.e. remain upright despite inclines and not fall through the ground)? They don't even really need gravity, I just need them to appear to be standing, walking, etc. upright on the terrain.
Answer by UFO_Pirate · Dec 16, 2013 at 04:10 AM
If the trouble is the enemy falling over then in the inspector panel of rigidbody it will have a constraints section, and you could freeze its X or Z rotation, that will keep it from falling over but that might cause problems in a 3d game.
Your answer
Follow this Question
Related Questions
Precise Collision Detection 0 Answers
Hi, I am trying to detect if a rigidbody has an object below it. 1 Answer
Dealing with mass tree spawning 1 Answer
physics.OverlapSphere colliders 1 Answer
Help With Curved Conveyor 0 Answers