In my game, I am adding one display object as child of another as below
[lua]local art = sprite.newSprite(artSet) --This being main display object
art.sensor = display.newCircle(art.x,art.y,100) – This being attached object which is a sensor object to implement “attack” range for art object.[/lua]
However, when I add collision handler for art.sensor above and user e.target.parent, I don’t get art object but rather global display group object of which every display object is part of.
I guess this boils down to how to get parent table when we have handle to a child element of that table.
Any clues? [import]uid: 48521 topic_id: 10933 reply_id: 310933[/import]
[import]uid: 33866 topic_id: 10933 reply_id: 39811[/import]