Little worlds: problem when reacting to the terrain depressions

Hello guys!
Kokumo here, with some question!

I’m working in my first game, fps/rts one, which has as scenary different little worlds.
I managed to resolve the faux gravity (maybe it needs some adjustments… but it’s okay for now) which works like the real one, in some way.

My first attempt was to create a very simple world using 3d Max, so i made a sphere; inside Unity i assigned to it a sphere collider and… i succeeded: my character could walk and jump around that world (it is a capsule + its own collider and rigid body).
Then, to my second attempt i modified the world creating mountains, slopes and cannons… and the magic disappeared: my character went through the mountains and floated over cannons.

I think i could solve mountains problem adding some cubes, cylinders or whatever i need to make them walkables or not walkables… but… how can i resolve the problem of the rivers and cannons? i mean, i would like my character reacts to the terrain depressions.

I can’t use mesh collider because of the quantity of polygons i use.

Any ideas?
Thanks in advance.

Since you seem to be using static meshes, a straightforward solution is to create a simplified collision mesh with a lower number of triangles than the rendered mesh. You aren’t forced to assign the same mesh to both rendering and collisions. :wink:

Another solution would be to break your mesh into multiple parts. I haven’t done thourough testing of collision mesh setup, but it -seemed- to me that a single mesh’s collision setup takes exponentially longer to compute the more you add triangles.

A further optimization to the multiple parts would be to load those many terrain parts gradually (say two or three at a time), starting from the player’s position and using coroutines to make sure the game doesn’t stall while that happens.

Thanks for the reply Werewraith.
I thought break the world into several pieces, but this idea doesn’t convinced me too much… but looks like could be one of the best aproaches… or the only one.
Trying to make a low poly world is impossible because looks horrible.

This quote es very important because is something that always goes unnoticed for newbies; in my case, it doesn’t work :frowning:

Any more suggestion?

Thanks!