Ejemplo 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);
    }
Ejemplo n.º 2
0
 private void Start()
 {
     sphericalCoordinate = new SphericalCoordinate(transform.position);
     transform.position  = sphericalCoordinate.GetCartesianCoord() + targetToFollow.position;
 }