Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. Vector3 dest = destination.transform.TransformPoint(0, 0, behindPositionDistance);// GetBehindPosition(destination.transform, behindPositionDistance, elevation);
  2. Debug.Log(dest);
  3. float eleveMax = Mathf.Max(destination.GetComponent<MeshRenderer>().bounds.extents.x, destination.GetComponent<MeshRenderer>().bounds.extents.z);
  4. dest = new Vector3(dest.x, eleveMax, dest.z);
  5. camera.transform.position = dest;
  6. camera.transform.rotation = lookNorth;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement