Hi,
Here it is the problem.
2 over lapping display objects.
And touches going through.
I have tried event:stopPropagation()
it stops all the particular event in my scenes.
I can think of couple of ways to fix it.
example:
if obj:hitTestPoint(event.x,event.y)
and bottomObjWithIn(event.x ,event.y) ~= true
then
--do something
end
In corona you can just use " return true " ,
That prevents the touch of going through multiple objects.
That dose not respond in Gidros:)
I really like to know is there any easier way?
I have tried looking through the forums,
I could not find what I were looking for.
Thanks in advance.
www.zoolax.com
Comments
You can try to first find using the
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
Thanks,That is simple ,and effective.
So I am at a cross roads, do I place this move event at the individual sprite level, and then try to pass the movement to the parent group? or do I leave it at the group level and pass it down to the sprite?
My difficulty is trying to figure out how to pass this through in either direction.
Would love to see an example.
---------------------------------------
But from what I am getting;
There are may ways,for example:
1.Create a table and add all the sprites into that table
2.add event listener to each sprite,so it will be selected on touch end and when I move it ,it moves that single sprite.
3.create a separate function that loops through the table and move other sprite as well.
put this function into the touch function so it will get activated as you touch the sprite.
of course there are many ways.