Hi all,
What is the best known method to align an irregular (but convex) physics body with an irregular display object of the same shape? I’m having trouble discovering how to get the new display object to match the body. They are always offset, I guess because one has its origin about the centroid and the other around the center of a bounding box?
When I tried using the calculated centroid of the polygon as well as the height and width of the bounding box for the display object and then converting that into correct anchor points, I get a perfect match between the two, but this seems to modify other object’s anchor points and screws up the alignment of any other polygon I have on the screen.
Edit:
I think I figured it out, seems like you have to have an offset table of vertices for the display object and physics object so they line up.
