- Home /
Character Controller collision on Mesh Colliders Slopes Issue.
Hello everyone,
I am new to unity and game development in general and trying to learn by making a 2D platforming game. Currently I have an issue with the character controller going down very steep slopes. The best way to explain it is to show you a video which you can find attached below.
The problem is that when the character goes down steep slopes, he basically is glued to the wall all the way till he hits the ground. Is this supposed to happen? If yes, how can I fix this issue. (Im thinking maybe I should re model the ground and make a sharp slope so the character falls in directly, but i would rather keep it as is if anyone can give me a solution).
Details:
1- I am using the character motor script along with the platforming input controller. 2- The ground has a mesh collider attached to it.
Any help is appreciated. Thank you very much.
Answer by Becoming · Jun 13, 2013 at 05:38 PM
you should check the settings of the character controller... there are some settings for slopes... i cant help you very well as i never use the character controller for anything more than testing and examination of the levels but i think there are some settings that could fix this...
BUT, you should consider to abandon the character controller approach and go for a pyhsics/rigidbody solution... this will give you the most realistic/convincing results.
good luck!
Thank you for your reply, I have been thinking of adding a rigidbody controller for a while since I always bump with new problems every now and then. I would like to ask a couple of questions for rigidbody controllers. I hope you can help me.
1) What is the disadvantage of using a rigidbody controller over character controller?
2) Is it possible to make a sliding effect that is similar to the character motor? I will need it to slide on tagged objects rather than when over the slope limit.
3) When I am adding my character with the bone structure and animation. They will all be the children of a gameobject containing my rigidbody script?
4) Do you have a specific tutorial that you recommend me to start with?
Thanks in advance.
Well, my ability to help is limited as i am an artist and no programmer but i also do all the physics adjustments in our game, so i know some things about physx...
1) the advantage of the rigidbody approach is that other things can push your character while with the character controller that wont happen without scripting... also it behaves physically which can be good in many ways... falling, bouncing, sliding...
2) you can use physic materials(i.e. the ice material) to make slippery surfaces and that would make your character slide or not depending on the physic material. you can make and adjust your own physic materials.
3) Yes! About character movement: this has to be done with forces, a force for forward/backward movement, a force for jump and so on...
4) No, Sorry! Though, i think its a good thing to get started with scripting as this would probably be just a few lines of code... but i dont know too much of all this as an artist... and i don't know your coding skills ;)
hmm, i looked at youtube and found this... maybe it helps... if its a ball or a character does not matter so much in the first place... later on you'll have to deal with animations and triggering them accordingly to the movement but thats a whole different story anyway ;)
Good luck!!
Your answer
Follow this Question
Related Questions
How do I detect a collision between two colliders? 2 Answers
CharacterController can jump through moving objects 1 Answer
CharacterController and end of collision 2 Answers
mesh collider problem 1 Answer