Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void SetOrientation()
- {
- Vector3 surfaceUp = transform.position - planet.transform.position;
- surfaceUpRotation.SetLookRotation(surfaceUp, -transform.forward);
- surfaceUpRotation *= Quaternion.Euler(90,0,0);
- transform.rotation = surfaceUpRotation;
- }
Advertisement
Add Comment
Please, Sign In to add comment