- Home /
Terrain and Character Controller issue
My character has a character controller. The terrain has a terrain collider.
My character didn't fall through the terrain.
Everything worked fine, if the terrain is all flat as it's initialized.
Here's the issue: when I raise the terrain height, my character will not "climb" on the hill, but will be penetrate into the hill(terrain), though he still would not fall through, but rather stay in the original height.
If I initialized the character on the top, he will not be able to get down from the mountain, but rather fly in the sky, when I try to move it into to the plain.
How can I make it able to "climb" and "get down from the mountain", make it walk tightly on the terrain?
I've tried to adjust the radius of the character controller. It doesn't work.
Answer by SisterKy · Aug 07, 2011 at 09:06 PM
have you tried checking the terrain-collider in the cog-wheel-tab of terrain?
also, collisionmatrix may cause trouble. go to Edit > Project Settings > Physics > collisionmatrix
Sorry, I can't really help you from experience... just what I've read on the topic the past few days while retagging (so I can't provide any follow-up-support)
... are you using unity3.4? (apparently it's quite bug-ridden :/ )
Greetz, Ky.
Thank you, $$anonymous$$y! But what and where is the cog-wheel-tab of terrain? And, I've checked all the collisionmatrix by default.
http://download.unity3d.com/unity/features/images/terraintools.png The rightmost button.
Answer by mcroswell · Jul 14, 2012 at 05:58 AM
I just had the problem that "justbecrazy" had. After years of using Unity it (the terrain and character collider) just started acting really weird! My character would penetrate certain parts of the terrain and not others.
My fix: 1) Export to raw terrain. 2) Create a brand new terrain (don't use even part of the old one!) 3) Import from raw terrain and repaint/add trees etc (it usually looks better the second time around anyhow!)
NOTE: I'm not really sure when things went bad with my earlier terrain since there were no actual visual clues. I may submit my world as a bug.
Answer by imdashraful17 · Sep 05, 2020 at 09:00 AM
I think the best way would be to export the Terrain and convert it to a mesh model using some other programs and re-importing it in unity and it won't cause that anymore. It will help increase the performance too.