Hi,
I am trying to have three physics bodies and remove them when touched. Now the issue is that I cannot have the event.target correctly recognize the object touched.
local onTouch = function (event)
if "ended" == event.phase then
event.target:removeSelf() ----Fails, as event.target is nil
end
end
Runtime:addEventListener("touch",onTouch)
but if instead, I use
object:addEventListener("touch",onTouch)
it works. I can continue to work with this workaround, but would like to understand why is it that the Runtime event does not recognize the target object?
cheers,
Jayant C Varma [import]uid: 3826 topic_id: 3476 reply_id: 303476[/import]