Hi!
I’ve noticed that physics objects in a group are no longer working once the container group is moved.
Actually, the group is moved, but the physics engine react to the original position of the physic body, not to its new position.
Is that normal? Is there a solution?
[code]display.setStatusBar( display.HiddenStatusBar ) – HIDE STATUS BAR
–> Enable physics
local physics = require “physics”
physics.start()
–physics.setDrawMode( “debug” )
physics.setGravity( 0, 30 )
myRect = display.newRect( 100, 200, 100, 100 )
physics.addBody( myRect, “static”, { friction = 0.3 } )
myGroup = display.newGroup()
–physics.addBody( myGroup, “static”, { friction = 0.3 } ) --> Possible solution? Not working with or without this line anyway.
myGroup:insert( myRect )
myBall = display.newCircle( 100, 150, 30 )
myBall:setFillColor( 0, 0, 255 )
physics.addBody( myBall, “dynamic”, { density=1.2, friction=1, bounce=0.2 } )
myGroup.y = 200 --> when this line is removed, it’s working[/code]
[import]uid: 25327 topic_id: 7825 reply_id: 307825[/import]
[import]uid: 25327 topic_id: 7825 reply_id: 29148[/import]