Hey guys!
I am currently creating a Vector2 array to store the starting rotation of a bunch of cameras that I have in my scene.
I am getting some strange behavior and was wondering if I overlooked some fundamental.
for(var i : int = 0; i < camerasOriginalRot.length; i++)
{
camerasOriginalRot[i] = new Vector2(cameras[i].transform.localEulerAngles.y, cameras[i].transform.localEulerAngles.x);
print(camerasOriginalRot[i]);
}
The issue that I am having is for some reason if the value that I grab is negative, it adds 360 to the value which completely defeats the purpose of grabbing the starting rotation. I need the negatives however and I’m not sure what would be causing this. Also oddly enough, if I grab the starting rotation from the cameras array, it shows the true values with negatives and positives, but when I try adding them all prior to any player interaction, the negatives are gone. ![]()
Thanks for any and all input guys!! ![]()