Page 1 of 1

[physics] Fixture:testPoint does not appear to work on Chainshapes

Posted: Tue May 10, 2016 6:48 am
by Connorses
The title pretty much explains it. It would appear that Fixture:testPoint does not work with fixtures with nothing besides a single chainshape in them. I'm sure I could find workarounds (such as using 'triangulate' to break it into triangles and testing those) but I'd like to know if anyone else has come across this problem, and if they have a better solution.

Re: [physics] Fixture:testPoint does not appear to work on Chainshapes

Posted: Tue May 10, 2016 7:52 am
by ivan
Chain shapes have 0 area so a point could never be "inside". This is because chain shapes are just collections of edges.
I suppose you could test if a point is "near" the edges of the chain.