Creating a Window - Camera movement
Hi,
im trying to use my screen as a "window to another world". I will control this with an eye tracker but the start is difficult somehow, especially because im new to unity but i want to start with a small project.
so, i made a scene with a camera which moves xyz via keyboard tight now (will be an eyetracker later) im trying to get the right fokus of the camera.
i tried transform.LookAt
with Vector3, one element as a target but it doesnt work. somehow the camera is moving into the scene. so i thought about calculating the right angle of the camera manually.
is there a small tutorial or example how i could do this step? im hopefully not the first one trying this.
my movement xy with keyboard:
float xAxisValue = Input.GetAxis("Horizontal");
float yAxisValue = Input.GetAxis("Vertical");
var Kamerapos = new Vector3(xAxisValue, yAxisValue, 0.0f);
if (Camera.current != null)
{
Camera.current.transform.Translate(Kamerapos);
}
I'm not sure what you want to acomplish. To rotate camera based on some input or to make camera look towards some object?