I’ve been getting to know unity through the user manual recently and up until know it’s been amazing except for the following part about character movement associated with character colliders and rigidbodies. So i’ve broken this down into three queries listed after the up coming Unity manual text.
Unity manual text
Character Controllers
You use Character Controllers if you want to make a humanoid character. This could be the main character in a third person platformer, FPS shooter or any enemy characters.
These Controllers don’t follow the rules of physics since it will not feel right (in Doom you run 90 miles per hour, come to halt in one frame and turn on a dime). Instead, a Character Controller performs collision detection to make sure your characters can slide along walls, walk up and down stairs, etc.
Character Controllers are not affected by forces but they can push Rigidbodies by applying forces to them from a script. Usually, all humanoid characters are implemented using Character Controllers.
Character Controllers are inherently unphysical, thus if you want to apply real physics - Swing on ropes, get pushed by big rocks - to your character you have to use a Rigidbody, this will let you use joints and forces on your character. But be aware that tuning a Rigidbody to feel right for a character is hard due to the unphysical way in which game characters are expected to behave.
My Queries
Part 1
I understand that great if you attatch the character collider to your character your able to slide along walls, detect steps etc(which is very cool)
but say for example your character is hit with a missile? Does the previous statement mean to say that because character colliders aren’t affected by physics the character wouldn’t be blown back by impact?
if so then how would you get your character to respond in such a way that he/she is blown back by the impact or is calling up a pre made animation the only way?
Part 2
The rigidbody will allow you to animate seperately and allow impact as it can be effected by forces however if you want to make your character slide along walls e.g (in a third person shooter) or to detect stairs you’d have to do what exactly??
part 3
I was wondering if there is anyway you can get the best of both in which your character detects things such as stairs, walls, etc but is also capable of being pushed, pulled and blown around.
This must be possible because games such as mass effect and others have the all around ability to do this. Is there anyway of blending the two so that you have character colliders and rigidbodies or can one or the other handle both physics and detection?
Hope someone can shed some light on the subject because the concept behind these two seems so confusing at the moment.
Many thanks in advance.
:shock: