1
Support / Problem with tilemap chunk colliders
« on: June 06, 2015, 03:57:59 pm »
I'm making a little platformer using physics to move my characters and other objects. I've run into a little problem with the tilemap chunks and their colliders. Sometimes if there is a border of two tilemap chunks on a flat surface my characters are walking along they will collide with the border when moving over it, seemingly hitting an invisible wall. It seems the collider of my character is just enough inside the tilemap collider he is standing on to hit the corner of the collider of the chunk he is trying to move on to.
I tinkered with the source code and found out that there is a hard coded limit of 32 for the size of the chunks, so I tried increasing it so that my level would be only one chunk. This works but poses another problem, the number of tris rendered goes up by a lot, from about 3k to around 19k, I guess because the entire level mesh is now being rendered all at once. It doesn't seem to cause much of a performance hit right now, even though I'm working on a pretty low-end laptop, but I'm afraid it might become a problem later on if my levels get bigger.
Is there a way to have the tilemap be composed of multiple smaller chunks but still have only one collider? Or is there some other solution to this?
I tinkered with the source code and found out that there is a hard coded limit of 32 for the size of the chunks, so I tried increasing it so that my level would be only one chunk. This works but poses another problem, the number of tris rendered goes up by a lot, from about 3k to around 19k, I guess because the entire level mesh is now being rendered all at once. It doesn't seem to cause much of a performance hit right now, even though I'm working on a pretty low-end laptop, but I'm afraid it might become a problem later on if my levels get bigger.
Is there a way to have the tilemap be composed of multiple smaller chunks but still have only one collider? Or is there some other solution to this?