Hi,
I don’t know if it has something to do with the new build 2949, but I noticed that with this build, my physics bodies no longer obey the anchorX, anchorY settings!! Only the image follows.
To illustrate what I mean, I have included a very simple code below. If you can test it, pls see (in Hybrid Draw Mode) if the images and physics align in your simulators.
In my case, the physics bodies ALWAYS remain on center X,Y, no matter what my anchorX, anchorY values are. The images however, obey the anchorX/anchorY settings. In the example, i set the anchorY to .5 and it shifted the anchor accordingly to the cirlce and square, but their respective physics bodies still remain on center x,y.
physics = require "physics" physics.start() physics.setDrawMode( "hybrid" ) local circle = display.newCircle (200, 100, 30) physics.addBody (circle, "kinematic" ) circle:setFillColor (1,0,0) circle.anchorX = 0 circle.anchorY = .5 circle.x = 100 circle.y = 300 local square = display.newRect( 0, 0, 60, 60 ) physics.addBody (square, "kinematic" ) square:setFillColor (0,0,1) square.anchorX = 0 square.anchorY = .5 square.x = 100 square.y = 100 local function rotation() square.rotation = square.rotation + 3 circle.rotation = circle.rotation + 3 end local x = timer.performWithDelay( 20, rotation, -1 )
I don’t remember having this problem with earlier builds.
Thanks!
Santi