- Home /
Making a character controller work with physics
so my game is mostly physics based, and I'm trying to get a good player movement system in place. just using a rigidbody would make sense but then there's the problem of going up stairs and slopes. Basically I want to try to get my character controller to interact with physics. How should I go About doing this? Or would it be easier to just try and get a rigidbody controller to work with stairs and slopes?
Well you can make rigidbodies go up stairs. Of course it won't be that easy as using character controller. I haven't been able to make it as smooth as with character controller. You can do make collider move over steps by doing raycasts (or any other supported shape casts) and then move your character based on what is ahead, change rigidbody's velocity direction. You could also make stair collision shapes to be ramps, instead of using visual mesh for collision.
Answer by N-8-D-e-v · Sep 25, 2020 at 11:22 AM
You cannot use the character controller with Unity Physics, I would just use a rigidbody controller, and give stairs a sloped collider, as opposed to a stair collider
Ok this is actually a very good idea I never thought of this. Thanks.
Your answer
Follow this Question
Related Questions
How to change CC script to Rigidbody script 1 Answer
CharacterController applies a force to the Rigidbody object [maybe bug] 2 Answers
Running on walls 1 Answer
Character controller partially passing through rigidbody in a head on collision 2 Answers
Erratic Physics behaviour while testing in 2 computers 0 Answers