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