Box2D body selection
BlitzMax Forums/Brucey's Modules/Box2D body selection
| ||
I am having trouble finding out if x, y is inside of a body. I have tried taking the mousedown function etc that is used in the examples but it never returns a true. |
| ||
You can test if a point is inside a shape with b2shape.TestPoint(), but never used it myself. |
| ||
Got it working... kinda, however if I create a triangle body it does not work correctly, boxes, rects, circles are fine, but with triangles it seems to be confused as to if it is inside of the body or not. |
| ||
Perhaps you can add some code especially for triangles: http://www.blackpawn.com/texts/pointinpoly/default.html |
| ||
Doh my fault, placed an exit where one shouldnt have been by mistake, it work fine... thanks for the link thou. |