- Home /
CharacterController or Collider/Rigidbody
Hello
I am working on a 2D side scrolling game with Unity iPhone (just to learn at the moment), and originally started using rigidbodies with colliders, which seemed to be working well. I started looking at the charactercontroller recently, to see what it was used for, which got me to thinking about what was best to use...
I've been reading the documentation on both, but still not really sure if there is any benefit to use one over the other for my player character, or the enemies. Is there any performance gain or ease of programming for one or the other, which would make it more useful for my situation?
Any information or suggestions would be greatly appreciated.
Let me just ask you this in return. Why is it called character controller?
Answer by Sriram · Dec 08, 2010 at 06:08 AM
There are a few things that differ, The character controller is not entirely governed by the physics engine, so if you have a game where your character uses a lot of physics, or you need to check collisions in different situations its advisable to use a rigid body component for your character and write your own simple animation script.There is a good rigid body FPS controller script on the community which you can find here
But on the other hand if you donot require these features the Controller provided by unity are a great way to save time to quickly prototype a game.All of the game examples provided by unity use the standard controllers so you can go ahead and see how they have done it.
Hope this clears your doubt!
Answer by ChiuanWei · Dec 25, 2011 at 04:45 AM
when you use characterController ,u can addForce in OnControllerColliderHit method! so the other physics gameObject will still do some physics movement.
Your answer
Follow this Question
Related Questions
Preventing Movement - Character Controller - 2D 1 Answer
2D rigidbody movement & walls 2 Answers
2D Collision Between Sprites 0 Answers
Best way to move a rigidbody 1 Answer
Unity 4.3 CharacterController collision with physics 2D not working 1 Answer