Ejemplo n.º 1
0
 public void InitCamPos()
 {
     if (FollowObj == null)
     {
         return;
     }
     lookatNow = lookatWant = FollowObj.TransformPoint(lookatAdd);
     eyeNow    = eyeWant = CalcEyeByLookatYPD(yaw, pitch, distance, lookatWant);
     this.transform.position = eyeNow;
     this.transform.LookAt(lookatNow, Vector3.up);
     this.GetComponent <Camera>().fieldOfView = fov;
 }
Ejemplo n.º 2
0
    public void InitCamPos()
    {
        cam = clientmain.getMainCamera().gameObject;

        eyeNow = eyeWant = CalcEyeByLookatYPD(yaw, pitch, distance, lookatWant);
        cam.transform.position = eyeNow;
        cam.transform.LookAt(lookatNow, Vector3.up);
        cam.GetComponent <Camera>().fieldOfView = fov;
        if (FollowObj == null)
        {
            return;
        }
        lookatNow = lookatWant = FollowObj.TransformPoint(lookatAdd);
    }