Esempio n. 1
0
    public void MoveCamera(float horMove, float verMove)
    {
        sphericalCoordinate.Rotate(horMove * horRotateSpped * Time.deltaTime, verMove * verRotateSpped * Time.deltaTime);
        transform.position = sphericalCoordinate.GetCartesianCoord() + targetToFollow.position;

        transform.LookAt(targetToFollow.position);
    }
Esempio n. 2
0
 private void Start()
 {
     sphericalCoordinate = new SphericalCoordinate(transform.position);
     transform.position  = sphericalCoordinate.GetCartesianCoord() + targetToFollow.position;
 }