Hi, I’m pretty new to Unity and am just trying to figure out how to make it so that when I am moving the camera around it doesn’t go through the ground because that would obviously not make for an immersive experience. Any and all help is appreciated very much! Here are some screenshots of my problem. It is a before and then after traveling shot.
Also, if anyone knows or can find another forum that explains the issue and solves it, please drop a link. I couldn’t find one but if someone could that would be great!
hey, what version of unity are you using? I did see this issue once with one particular version. It happened randomly after creating a new terrain. No matter what I did I would fall through terrain. Ended up making a new map with terrain and didn’t see the issue. I would try updating to a new version of unity if you haven’t and recreating the map from scratch. or Make a new test map with new terrain to see if that works. If you don’t want to loose your work so far, try exporting the heightmap and then importing it into a new terrain.
Thanks for the response! I am running Unity 5.1.2f1 Personal Edition. Just to be clear, the problem isn’t that I fall through the terrain, but rather that I can travel through it. Also, I know this is a stupid question, but how do I update Unity or check for one? I am on Mac by the way.
What you’re asking for here is a way to do collision detection. Probably your best bet as a beginner would be to just use the physics engine to achieve what you want. You can learn about that here:
What kind of code are you currently using for the movement? transform.Translate?