- Home /
walking throu terrain
My character walks throu the terrain, i have a character controller with default settings on, the terrain has the terrain collider on it with material none,trigger off, terrain data none, and tree collider on. any help would be aaprciated.
just to be clear the character walks along the flat hits the hill and walks thou it on the same Z plane
I added a box collider to th object and stopped the falling throu should it have had a collider to begin?
ok more playing with it i now have it running up hills now but its launching like a ramp will AddForce fix that?
not sure what else i can do i have added colliders character components mesh colliders changed sizes i even brought in my own terrain from lightwave i still either fall thou or walk throu the terrain. is it a scripting issue or a problem with my meshes?
Answer by dorpeleg · Jan 18, 2012 at 08:19 PM
click your terrain and look in the inspector make sure the terrain collider is on if its on maybe try choosing some physics material
i found the problem today finnally i hit up the scripts that come with unity and found the velocity code to stop the sinking and floating off. the mesh colider and velocity in the UpdateFunction was the fix
Answer by Posly · Jan 16, 2012 at 01:58 AM
Try adding a rigidbody maybe that will work. What I think is happening is that the terrain is very thin and when the character moves it might be actually just skipping over the terrain since it's so thin. If you make your character bigger it should make it impossible to skip through the terrain in one frame.
i added a cube of the same size larger and smaller and it never fell through, loaded a lamp post i created and it fell throu the box collider is the only thing stopping it from falling through and the only differnce between my items and the game made cube
not sure but in the FBXImoprter try checking the box "Generate Colliders" might help
Answer by bodec · Jan 16, 2012 at 02:29 AM
I am a bit closer now i now its not the character, i added a ridged body and it fell throu the terrain i placed the character about a meter above the terrain with and with out the ridged body same effect.
Your answer
![](https://koobas.hobune.stream/wayback/20220613063018im_/https://answers.unity.com/themes/thub/images/avi.jpg)