i am trying to move one of my physics body to a different xAxis on collision
local function onCollision(self,event)
if event.other.name == "block" then
if (event.other.x - self.x) > 210 then
self:removeSelf()
self = nil
transition.cancel( event.other.move )
event.other:removeSelf()
event.other = nil
gameOver()
else
print("else")
transition.cancel( event.other.move )
event.other.x = 1024
updateScore(1)
end
end
end
ball.collision = onCollision
ball("collision",ball)
but it is saying
"Cannot translate an object before collision is resolved"
How can I do that ?