this has me totaly stumped.
im telling my camera to move down 10 like so:
function initCam()
{
cam.transform.position.y = -10;
}
and for some reason when i test the app it goes from 0(its starting Y position) to -11.10805. i cant imagine why it would blatantly ignore what i have written in the script.
here is how its called:
function OnGUI ()
{
if(totalTargets == 1)
{
if (GUI.Button(Rect(Screen.width*.1, Screen.height*.45, Screen.width*.15, Screen.height*.05), "Initialize"))
{
initCam();
for(t in TargetedTargets)
{
if (t == true)
{
targets
.initNow();
}
c++;
}
c=0;
}
}
}
side note: when i try to put it back to 0 using cam.transform.position.y = 0; it goes to -1.108051 instead. so far this is the first piece of code for moving the camera in this project. so it cant be any interference from any other scripts.
- forgot my unity was out of date, could be some kind of error. i'm going to update and restart my PC or something, see if that fixes it.