Jump to content
  • Advertisement
Sign in to follow this  
ChristOwnsMe

Unity Tile Map Collision - TileData vs. Colliders

This topic is 2110 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I have a large tile map(8400x2400) and am streaming the tile data around the player as he moves around(no collision yet, so just a camera). I am debating between using colliders on the tiles that are within a small radius around the player, or any object that can collide with terrain. Are there any advantages to dynamically adding and removing colliders to tiles for collision vs. having all of your collision logic be based around the "solid" tile data of a tile? 

 

I am using Unity, so it is very easy to have the collider logic work for entities with a rigid body. I would just like everyones input. Thank you!

Share this post


Link to post
Share on other sites
Advertisement

You'd probably want to go with passability data for each tile, and just stream it along with the other tile info. Constantly generating and destroying objects for the sole purpose of map collision is really not very efficient. If your tile interactions aren't hugely complex then you could probably just use a uint for each tile and treat it as a mask that describes the tile's passability.

Share this post


Link to post
Share on other sites

I don't know, but I think you should implement the most straightforward algorithm you can think of, and if that performs well, then you can consider that to be the best solution.

 

I reason that software development is largely about managing complexity, so try to introduce as little as you possibly can, while satisfying the specification in question.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!