- Home /
Code for - Rigidbody vs Character Controller
As the Character Controller is still relatively new and most examples are around the RigidBody, what I would like to know is if the code is interchangeable between them!
I understand that a few things need to be setup in code respectfully for each to work, but I am interested in the main NUTS of the code being "cross domain" between each.
It might be obvious to some, but I am still just getting into Unity, so would be nice to know the score.
rigidbody is for handling physics and works very differently to the character controller.
thanks for the info, but not really what I was asking about.
I am personally going down the "Character Controller" path, but 99% of code examples are around the RigidBody setup. So I wish to know if I use that code (aside from the obvious imports and settings) will it still work?!
No it wont. Largely because rigidbody is handled in FixedUpdate() and works through the addition of Force.
The rest of the code will work, but you will need to make modifications to change a rigidbody movement to a character controller.
rigidbody is a base component where-as Character Controller is actually a higher level interface constructed from the scripting of base components.
A lot of people, when they are better versed, will often write their own controller and scrap the CC altogether. Very often, a rigidbody is required due to it being essential in the Collision system.
Your answer
Follow this Question
Related Questions
Character Controller, changing collider's size? 0 Answers
Let Character Controller jump. 0 Answers
RigidBody Character Controller Bug 0 Answers
Problem with Movement Script 0 Answers
Rotate character controller on all axis 0 Answers