I’m trying to check what angle my object is at and performing a particular task when it reaches that angle.
if(transform.Rotate.x > 85){
do something
}
But this does not work. What is the correct way to do this?
Thanks
transform.Rotate returns void and has no property x.
Use transform.eulerAngles instead.
system
4
Hi
You should use :
transform.localRotation instead of transform.Rotate .
Regards
Laksh
if(transform.localEulerAngles.x > 85)
{
doSomeStuff();
}
–David