Hi All,
First post on here, so hopefully I can explain what I’m doing properly. I’ve created a couple of images that I group together in a display group. They overlap each other and with transparency, create the image I want to compose. This seems like the ideal use of a display group.
The components are round, such that if I add layer1 to as a physics body with a radius, it works properly. But once they’re all inside the display group, I know I can’t add the things inside the display group to as physics bodies… I have to add the display group.
The display group doesn’t position the center of its radius in the center of the display group, but rather the 0,0 top-left corner of the display group. How do I move the physics body center? Changing xReference/yReference doesn’t seem to do anything in the case of physics.
physics.setDrawMode("hybrid")
local fullthing = display.newGroup()
local layer1 = display.newImage("layer1.png")
fullthing:insert(layer1)
physics.addBody(fullthing, {density=1.0,radius=200})
You should see that the debug draw mode draws a circle with its center at the top-left of the group box, not at the center of the group box.
[import]uid: 12644 topic_id: 4932 reply_id: 304932[/import]