The auto-generated shapes are creating some tunneling problems at acute angles; I need to modify the shapes to extend beyond the bounds of the tiles in some cases in order to prevent this.
You should be able to set a specific collision image that will be used instead.
I agree that it’s not an idea solution, but at least it’s a way forward for you:
Thanks, yes I am using a custom collision image, but that still limits the collision shapes to the extents of each tile. So a tile like this for instance:
…when hit with a ray from the player to its right side who is moving left, is very likely to return a downward-facing normal due to the acute angle at the bottom-right corner. I can fix this geometrically pretty easily by detecting such cases and building an extra pair of vertices outside of the tile’s bounds (which doesn’t seem possible with just the collision image).
If editing the collision shapes per-tile isn’t possible, but reading them is, then I could also dynamically bake a convex hull. In many ways this would be preferable.
If Defold had support for adding multiple of those to a collision object (like you can do with the other shape types), you could write a script that generates all the shapes needed to cover a tilemap.
If Defold had support for adding multiple of those to a collision object (like you can do with the other shape types), you could write a script that generates all the shapes needed to cover a tilemap.
This would be very nice - my current workaround is to create the various hull collisionshape files in a directory, and to also create a “hulls” game object in which I nest collisionobjects that refer (1:1 sadly) to those collision shapes: