In the newer builds of Corona (2012.776), pivot joints using the rotation function no longer work. The object would rotate for a fraction of a second then cease to move after that. No errors appear in the terminal.
Here is some demo code that worked flawlessly and error free in older builds of the SDK:
[lua]local physics = require"physics"
physics.start()
physics.setGravity( 0, 0 )
physics.setDrawMode(“hybrid”)
display.setStatusBar(display.HiddenStatusBar)
W = display.contentWidth
H = display.contentHeight
local anchor = display.newCircle(W/2, H/2, 5)
physics.addBody( anchor, “static”, { radius = 5, isSensor = true})
anchor:setFillColor(0,0,255)
local planet = display.newCircle(0,0, 10)
physics.addBody( planet, “dynamic”, { radius=bodySize, density=0.2, friction=0.1, bounce=0.5, isSensor = true, isAwake = true } )
planet.x = W/2; planet.y = H/4
myJoint = physics.newJoint( “pivot”, anchor, planet, planet.x, planet.y )
local function move()
anchor:rotate(0.8)
end
Runtime:addEventListener(“enterFrame”, move)[/lua]
This is a major issue for us since our game focuses on this feature. Checked through all the release notes to see if the rotation function was modified at all. Everything seems to be in place, correct me if something is mistaken.
Any assistance on this issue or support to get it fixed would be greatly appreciated. [import]uid: 40758 topic_id: 24289 reply_id: 324289[/import]