When I move the xreference point of my ship, the pivot joint with another body stills turns around the old center of the ship…
schiff = display.newRect(0, 0, 200, 110)
schiff.xReference = -schiff.width/3
schiff.yReference = 0
schiff.x = 100
schiff.y = 200
physics.addBody(schiff, "dynamic", {density=1, bounce = 0, friction = 0})
engine = display.newRect(0, 0, 20, 14)
engine.x = schiff.x
engine.y = schiff.y
physics.addBody(engine, {density=1, bounce = 0, friction = 0})
local engineSchiffJoint = physics.newJoint ("pivot", engine, schiff, schiff.x, schiff.y)
How can I make the pivot joint to turn around the new xReference?
Josper [import]uid: 55806 topic_id: 9618 reply_id: 309618[/import]