I get this error when I try to set the x and y coordinates.
When my ball touches an object, I want to reset that object, move it to start position.
So I have a collision detection and postCollision.
If the ball hits a certain object, I want to move the ball to center of screen, so I have this function f.ex :
[lua]local function onCollision(e)
if (e.other.name ==“leftwall” or e.other.name == “rightwall”) then
ball.x = W/2
ball.y = H/2
end
end[/lua]
Even if this is postCollision, I get the above error, and the ball is not moved.
[import]uid: 61610 topic_id: 11077 reply_id: 311077[/import]