Euler Angles under Empty object

I have question. I use transform.eulerAngles.y to control angle on object so I use condicion:

then something

but object is under empty object and I start rotate with empty and the condition doesnt work because the object work with global coord but angle of an object is not changed, bc object has a angle what I need. What I need to use for this solution?
Sorry for my bad English, many thank for answer.


hey Andy, I am not quite sure whether this is what you want.
If you are looking for the objects euler angle instead of the global one you can use: transform.localEulerAngles.y==90
maybe giving a range to your condition statement would be better instead of using ==90 which might never get true if you continuously rotate the object, esp if it gets multiplied by Time.deltaTime. it would return false even if the angle is 90.001.
maybe a screenshot of what is happening would help answer your question better.