Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: spbsmile on July 01, 2014, 08:12:03 AM
-
hello!
(http://i.imgur.com/ApsL8DS.png)
when mouse onhover sprite - sprite(yellow)position animate
i use script TweenPosion and all ok
but... a have problem
little colliders(buttons(black)) ovveride big collider(sprite) and i when mouse move on little collider . ( little collider inside big collider )
valie field isOver assign - false . and tween position come back
this solved by layer ...
i set two difference layers on button and sprite
how to do onhover ignore layer ?
thanks!
-
how ignore only onhover. onpress should work (as button)
probably need to write a script, right?
-
up!
-
To ignore something, remove a collider from it.
-
if i remove collider , button stop working :(
-
Remove it from the small black square. You said it intercepts the events intended for the yellow rectangle. Logical solution -- get rid of its collider.
-
ok . i remove collider from black square .
but ...
as if to make a black square was the Advanced button?
-
let your onHover for the sprite(black) ignore that layer.
how to do it using NGUI ?
thanks!
-
I don't understand your question. As I said, the way to "ignore" objects, is to make sure they don't have colliders. What does "as if to make a black square was the Advanced button" mean? Your black square will either intercept events (if it has a collider) or it won't (if it has no collider).
There is no in-between.
-
i want two colliders ^)
first - yellow sprite - Tween Position - on event OnHover
second - black sprite - Bubble - on event press
yellow and black sprite intercept events.
but ... collider of black sprite ovveride collider of yellow sprite . and tween position come back (
-
NGUI has no event bubbling. You can forward events, however -- use UIForwardEvents, or UIEventTrigger.