Created
July 9, 2014 06:24
-
-
Save Zerophase/6956d5a2680e3a3501ab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Rotating with Quaternions. | |
Quaternion rotation = Quaternion.LookRotation(transform.position); | |
rotation *= Quaternion.Euler(0f, 90f, 0f); | |
transform.rotation = | |
Quaternion.Slerp(gameObject.transform.rotation, rotation, 1f); // place holder for testing final position. | |
// Rotating with vector 3 | |
transform.eulerAngles += Vector3.Slerp(gameObject.transform.position, | |
gameObject.transform.position + new Vector3(0f, 90f, 0f), 1f); // place holder for testing final position | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment