Hello again,
i have a small problem regarding collisions,
i have this function :
[lua]local function ballsCollision(event)
if event.phase == “began” then
if event.other.name == “rock” then
event.other.isVisible = false
event.other = nil
event.target.isVisible = false
event.target:removeSelf()
event.target.over = true
removeSmoothPath()
gameisActive = false
gameisActive = true
newExplosion(event.target.x, event.target.y)
newExplosion(event.other.x, event.other.y)
elseif event.other.name == event.target.name then
event.other:removeSelf()
event.other = nil
end
end
end[/lua]
but when object hits the “rock”, object and rock gets deleted from screen, but physical state of “rock” is still there and other objects colliding with invisible “rock”
can anyone tell me how can i avoid this behavior? many thanks [import]uid: 16142 topic_id: 17960 reply_id: 317960[/import]
