i want to change the position of an object but i get and this error:
cannot translate an object before collision is resolved.
i try many times trying to resolved it but i can’t. i just want this to change the player object to a different position when hits the ground 3 times… help please
code i use
local collisionNum = 0
function restartposition(self,event)
collisionNum = collisionNum + 1
if(self.name == “ground” and event.other.name ==“player” and collisionNum ==3) then
player.x=40;
end
end
ground.collision = restartposition
ground:addEventListener(“collision”,ground) [import]uid: 138440 topic_id: 24683 reply_id: 324683[/import]
[import]uid: 21331 topic_id: 24683 reply_id: 100186[/import]