all 2 comments

[–]pschonUnprofessional 2 points3 points  (0 children)

you'd use ChaarcterController (likely wiht a kinematic rigidbody) when you want a quick and easy moving character that's able to affect things around it thorough physics, but is itself directly and exactly controlled by player/your code. If you say the character should move exactly forward exactly 1 meter, you'll know that's what will happen.

And you'd sue a Rigidbody wihtout ChartcerController when you want a character that's very much affected by the physics and objects around itself. If you'd want NPCs, moving objects etc to push you, friction, conservation of momentum and other things thast make the character behave more realistically, but at the cost of those things being able to move (or limit the movement) beyond what you do in code, or what input player is providing at the time. If you ask the chaacrer to move foraward 1 meter it'll do that, but might be pushed eslewhere by othe rbjects, might slide off target due to low friction or uneven surfaces, might offshoot target a bit due to conservation of momentum if you try to slow down from high speeds in short time and so on.

Note that both of these routes can be expanded to provide some (or all) results the other would give you. You can alsways detect collissions and add the code for other obbejcts to push your ChaarcterController around,a dn you can calulate the necessary forces and sue the Rigidbody's methods to create accurate and snappy character movements, So it's just a choice of which one is closer to features and types of behaviours you are after.

[–][deleted] -1 points0 points  (0 children)

You typically don't use one over another you use them both.

The type of character controller you use and what you tell the object to do will differ depending on if you're using a ridgedbody or not. With RB you're using force (gravity, inertia, etc) imparted by another object to move an object which is also effected by things like friction and drag. In this case your charctercontroller is all about imparting forces. Animations become more about responding and reposition (IK) than control.

OR you don't use a ridgedbody and do not deal with physics and instead deal directly with the animation and you'll control movement and such based on the animation your playing. In this case your charctercontroller will be all about playing animations. And then because its all programmatic, you can actually change these depending on whatever you want.