Collision Bug


  • Posts: 2262
I've encountered a strange bug, and I'm not sure if this has been reported yet or not. I haven't found anything.

I have a tile that acts as a trap using text data to identify it. However it's not detecting collisions correctly. If my actor moves quite quickly towards it, it triggers as though the tile collision shape covers the entire tile, but in reality the shape only covers the bottom 25%.

I can edge my actor slowly over it without triggering it. As you can see from the attached images, my actor is too wide to actually fall into the hole left by the reduced collision shape, but when moving at speed it does.

Hopefully I've explained that clearly. Thanks.


  • *
  • Posts: 2659
It looks like this is another instance of 'snagging' collision boxes. This isn't so much a bug than it is an unfortunate quirk with Box2D. If you make the collision box for the actor one or two pixels thinner, does the trap work as it's supposed to? If it does then I think you've found the culprit and can go on working on a permanent solution.


  • Posts: 2262
Thanks merrak,  yes it does work as It's supposed to. It's just an issue if the actor is moving too fast.