setCollisionFromCollisionGroup not working as expected

I had a similar issue. @samme helped me get a sense for how this function works. Unfortunately, I don’t think this function sets the collision bounding box from Tiled’s collision editor (at least not pixel by pixel anyway). I still need to run tests to confirm how it actually works and I have plans to dig into the source code for my own edification, but it was easier to solve this problem a different way for me.

I’ve solved it by putting the objects I want to have custom bounding boxes for in an object layer and getting the bounding box info by iterating through those objects.

I can share my code this evening after work if you want to see it.