How can I re-set the reference point of my polygon physics body to align with my polygon shape?
I have a polygon and have added a body or “shape” as a physics body, but the body is displaced from the polygon because the reference point is automatically set to centre. Is there a way to re-set the reference point? [import]uid: 3018 topic_id: 4492 reply_id: 304492[/import]
Create the polygon, add the shape, then shift the reference point - or do you have a logic/functional reason for not doing that?
m [import]uid: 8271 topic_id: 4492 reply_id: 14098[/import]
I’m making a linerider type game - the user draws a line and to add this as a physical object I have to turn each segment into a polygon. Upon doing this, the reference point is automatically set to centre so the physical bodies are no longer aligned with the drawn line. There does not seem to be a way of setting the reference point of a physics body (series of x,y points in a table).
What I have ended up doing is working around this and using a png, aligning it with the drawn line segments and adding it to the physics world, a lot easier.
Mike [import]uid: 3018 topic_id: 4492 reply_id: 14195[/import]