I would like to detect collisions outside of the fixture body (imagine tower defense game use case).
One way is to add sensor body fixed on top of the regular visible body (tower), but I don't like this solution.
Is there a way to change detection radius overriding the fixtures rotation disc radius?
How to increase collision detection radius without adding sensor body
Re: How to increase collision detection radius without adding sensor body
The rotation disc radius is used internally for CCD so you wouldn't want to change that.
Have you considered making the tower itself just a larger body (circle, spanning the size you want) and just render it smaller than it really is?
Naturally, doing a sensor is another way.
Another way would be to call a World.detect() method every frame for every tower. Not a bad option, it will use the broadphase to accelerate.
There are probably some other ways too that I'm just not thinking about right now.
Thanks,
William
Have you considered making the tower itself just a larger body (circle, spanning the size you want) and just render it smaller than it really is?
Naturally, doing a sensor is another way.
Another way would be to call a World.detect() method every frame for every tower. Not a bad option, it will use the broadphase to accelerate.
There are probably some other ways too that I'm just not thinking about right now.
Thanks,
William
Return to “General Discussion”
Who is online
Users browsing this forum: No registered users and 1 guest