Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vector3 dest = destination.transform.TransformPoint(0, 0, behindPositionDistance);// GetBehindPosition(destination.transform, behindPositionDistance, elevation);
- Debug.Log(dest);
- float eleveMax = Mathf.Max(destination.GetComponent<MeshRenderer>().bounds.extents.x, destination.GetComponent<MeshRenderer>().bounds.extents.z);
- dest = new Vector3(dest.x, eleveMax, dest.z);
- camera.transform.position = dest;
- camera.transform.rotation = lookNorth;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement