Hi,
I am very new to unity as well as 3D programming. I am trying to move the camera using mouse but the movement is not perfect . I guess i am doing some calculation mistakes but not able to figure it out. My Script :
if (Input.GetMouseButtonDown(0))
{
mouseDownPoint =Input.mousePosition;
}
if (Input.GetMouseButtonUp(0))
{
mouseDownPoint = Vector3.zero ;
}
if (!mouseDownPoint.Equals(Vector3.zero))
{
Vector3 diff = mouseDownPoint - Input.mousePosition;
Camera.mainCamera.transform.Translate(diff);
mouseDownPoint = Input.mousePosition;
return;
}