Hello Guest

Author Topic: tilemap chunks  (Read 4429 times)

micky

  • Newbie
  • *
  • Posts: 23
    • View Profile
tilemap chunks
« on: October 08, 2013, 10:21:56 pm »
Is there any way to ensure that certain map chunks are all the same collider? (assuming they are connected) I'm having an issue trying to jump through map sections because a platform is say, 2 different chunks, so the rays and inside one of the colliders and ignores it just fine, but detects the other and starts bouncing around..

I love the tilemap editor but the chunking system is kinda cramping me up and I'm not sure what the best way to solve it would be.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: tilemap chunks
« Reply #1 on: October 09, 2013, 12:23:22 am »
No there isn't at the moment. The tilemap chunking system is essential for larger tile maps. If your tilemap isn't THAT big, then perhaps you could try increasing the chunk sizes. Its pretty much just a UI limit in tk2dTileMapEditor.cs
partitionSizeX = Mathf.Clamp(EditorGUILayout.IntField("PartitionSizeX", partitionSizeX), 4, 32);

Alternatively you modify your raycasts to cope with it. This is a fundamental issue with Physx - you can reproduce it with 2 boxes side by side. Or you could modify the physics mesh generation code to build it all into one large mesh.

micky

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: tilemap chunks
« Reply #2 on: October 09, 2013, 01:27:37 am »
Hmm. How hard do you think it would be to do the chunks(as one big chunk), but separated by what tilemap layer it is.. if I do one big chunk I just realized I could probably jump through walls if I hit a ceiling first, so regardless of chunk size, the floor would have to be a different chunk than the walls.

Modifying the rays would be ideal (not changing your code), but I have no idea where to start with that one.

micky

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: tilemap chunks
« Reply #3 on: October 09, 2013, 01:30:26 am »
Maybe I'm just being stupid and need to use separate unity layers for platforms and walls, duh. Pretty sure I can select that in your editor, sorry.