- Home /
Question by
zadit · Jan 19, 2020 at 09:39 AM ·
rotationscripting problemscripting beginnerscriptingbasicsrotate object
how to make a detect rotation script for negative rotation too
why (trigger = active) if the camera is in the rotation number from 0 to 75, even though I have set (trigger = active) if the camera is in the rotation number of -70 to 75. enlighten me please
void Update()
{
if (camera.transform.localEulerAngles.x >= -70 && camera.transform.localEulerAngles.x <= 75)
{
triggered = true;
}
else
{
triggered = false;
}
}
Comment
Answer by Thomas-Hawk · Jan 19, 2020 at 12:24 PM
is triggered, in turn, moving / rotating the camera?
Answer by zadit · Jan 20, 2020 at 10:02 AM
@Thomas-Hawk previously sorry I was not quick to reply to your message. is triggered will occur if the camera x rotation number is between -75 to 70