Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
about mouse(touch) events
« previous
next »
Print
Pages: [
1
]
Author
Topic: about mouse(touch) events (Read 5439 times)
Companella
Newbie
Posts: 29
about mouse(touch) events
«
on:
July 03, 2013, 11:40:30 am »
dear any~
If my ui button received a mousedown or touchdown event, also my game world can be receive the event too, but i won't.
so, how to do to that my game world can't receive this mousedown event ?
Please!
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: about mouse(touch) events
«
Reply #1 on:
July 03, 2013, 11:53:10 am »
Easy solution - put a huge invisible collider behind all the UI, so it blocks the ray into the scene.
Logged
Companella
Newbie
Posts: 29
Re: about mouse(touch) events
«
Reply #2 on:
July 03, 2013, 12:19:14 pm »
However, sometimes i need the event post in to game world.
eg: control my hero move, two finger scale the screen.
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: about mouse(touch) events
«
Reply #3 on:
July 03, 2013, 07:53:49 pm »
A button isn't a good control if you want to do 2 finger scales... if you still want to use it, you should hook into the ui manager to detect 2 finger scales. This is very specific to your game (you didnt' even mention 2 finger scale in your first post), and the solution will be pretty specific too.
Logged
Companella
Newbie
Posts: 29
Re: about mouse(touch) events
«
Reply #4 on:
July 04, 2013, 03:45:06 am »
Thank you
Logged
Companella
Newbie
Posts: 29
Re: about mouse(touch) events
«
Reply #5 on:
July 04, 2013, 05:39:16 am »
ok, "put a huge invisible collider behind all the UI" work perfectly~
Thank you for this idea~
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
about mouse(touch) events