|
Hey there, I was wondering what the best approach to creating a 2D (orthographic) tile-based world (dynamically generated) in Unity. Right now I am instantiating a (x by x) chunk of cubes (I have also tried 2 tri planes) when the player moves in a direction, such that the player is always moving into a chunk of cubes. Whichever direction the player is moved, new cubes will be created. The game starts to lag (FPS drop), however, when new cubes are generated. Each cube has a box collider attached to it. Does Unity check all possible collisions or something? I am using a character controller for the player, and static box colliders for the tiles (cubes). Am I going about this the wrong way? I read about creating one large mesh and using that as a collider, but how would that work with a tile-based world where there could be empty space between tiles and such. Any help or pointers would be appreciated, thanks!
(comments are locked)
|
|
Of course having too many colliders will cause problems. Usual solutions:
(comments are locked)
|
