In Unity 2D I am attempting to move the camera from one image to another using
if (Input.GetKeyDown(“space”))
transform.position = new Vector3(-15, -15, 0);
The camera starts off looking at the image, and the location transform is meant to have it change to looking at another. However, when I execute this it does not work. The investigator acknowledges that the position of the camera has changed to its new location; yet the camera is still looking at the image.
Furthermore, if I attach this function onto the image instead; the image will change its position and this will be acknowledged. But, the camera will still somehow be looking at it even though the camera has not moved either.
Regardless of what I do the camera always holds its position on the image, even though I am in play mode and everything is saying that it is working and is not looking at the image. I am assuming there is something simple that I need to toggle to stop this but I cannot find it around the interface at all.