- Home /
Simplistic Colliders for enemies
Hey guys, I've been encountering a lot of issues from working with rigidbodies due to their use of the physics engine, things flying places rapidly when a player appears in a particular location etc. I'm wanting to literally have the enemy fall unless they're colliding against the floor, and be able to collide against eachother. That's all I want, is there any way I can do this easily? I would use character controllers as they basically seem to do this, but are a lot more computationally expensive, any other solutions? I tried literally giving them a capsule collider and manipulating their transform, but for some reason they stop wanting to collide with walls and eachother again.
Answer by jtbentley · Oct 11, 2011 at 12:41 AM
Rigid bodies shouldn't be manipulated with transforms, because it's not syncronous with physics solves. You need to use the rigidbody functions to move them (such as rigidbody.position, rigidbody.MovePosition etc).
If you don't move them using those methods, their collision etc can do all sorts of crazy things.
However, regardless of what method you use, colliders touching each other is computationally expensive, I'd advise that after you get your collisions working again, you try to work basic avoidance into your AI/Enemy controllers :)
Your answer
Follow this Question
Related Questions
Rotating a transform with child rigidbodies 0 Answers
Create an environmental hazard area 1 Answer
Flying Controls Collision Issues 0 Answers
How to do static collision checks? 1 Answer