- Home /
Any way to solve capsule collider + rigidbody movement on Terrains? It's very 'stuttery'
Any help welcome. Thanks so much! -TT
Answer by Weylin · Sep 26, 2010 at 04:20 AM
I had a similar problem but was only when I introduced ray-cast into the mix. Once I either took ray-cast out or just told it to ignore everything but ground in my case it stopped being so stuttery.
How is your capsule being moved around on the terrain?
How did you tell it to ignore everything but ground?
Answer by $$anonymous$$ · Sep 19, 2012 at 01:54 AM
I think I had a similar problem, and fixed it by making the rigidbody ignore/not-interact with the collider. Put them both (or probably just the character controller since they're one object), on a layer that doesn't interact. Inspector>Layer>Add Layer>click on right side of inspector to name&create the new layer e.g. 'canttouchthis'
Then Edit>ProjectSettings>Physics and you should see the physicsmanager in the inspector, the checkbox where the two identically named 'canttouchthis' layers point to, and uncheck it, it's like the game battleships, think of them as x,y coordinates and you'll work it out. That'll make them ignore each other, and anything you want to change to the new layer you've created.
If you want it to ignore everything but the ground, create new layer 'ground' change terrain to layer:Ground in inspector, then go to physicsmanager and make the layer your player is on only interact with layer 'ground' by unticking the appropriate boxes.
This might not be your problem, but the symptoms sound identical to what was causing my robot guards in the Lerpz tutorial to 'stutter step' slowly.
Edit: Raising the object off the ground a bit could be worth a try, I had a robot stuck in the ground slightly, it causes stuttering until I raised it up.
Your answer
Follow this Question
Related Questions
walking throu terrain 3 Answers
Gameobject collision with Terrain C# 4 Answers
Disabling colliders in Terrain Trees? 1 Answer
Mesh vs. Mesh Collider for simple game setup 0 Answers
terrain tree children problem 0 Answers