- Home /
Animated characters does not stay upright with collider
Hi
I did this "Roll a ball " tutorial for beginners (https://unity3d.com/learn/tutorials/projects/roll-ball-tutorial) and that worked fine.
I would like to replace the ball with something more interesting like an animated character. I can make the animation work so far. If I dont add a collider I get this classic problem that it falls through the floor / plane. On the other hand if I add a collider then yes it stays, but I cannot control it probably.
If I create a box collider it might bounce a bit and it just stick there I cannot control it with the controller script from the tutorial (yes I did modify names) and it seems to work otherwise (I have a Rigidbody and if I uncheck "Use Gravity" controls works, but then I go through everything, except floor, hmm?).
If I add some of the other colliders like the Capsule and adjust it to fit, it does move around but the character is also rolling around itself, same if I use the mesh collider, convex and inflated check and add figure to mesh. So yes they do the job of not falling through the floor and I can collide with objects, but the character does not stay upright.
The "character" have a tail, lol, if that makes a difference.
Answer by ASPePeX · Jan 30, 2017 at 03:47 PM
"Freeze Rotation" on the Rigidbody should do what you want.
Thx, but even though I only freeze rotation, I cant move with mesh collider. If I use Capsule collider the character might jump a little forward but thats all.
Well I made a box collider placing it at the top body and then I freeze all rotation and only position Y. It Seems to work, but its funny that if I do not freeze position y I cant move at all.
Your answer
Follow this Question
Related Questions
How to make camera position relative to a specific target. 1 Answer
physics.OverlapSphere colliders 1 Answer
Box collider doesn't work with player object 0 Answers
Problem with 2D slopes and walls 0 Answers
Help with SWIPE CONTROLS 0 Answers