Last active
June 16, 2018 14:05
-
-
Save honix/baba061fb073ebf67469a83485b2f6eb to your computer and use it in GitHub Desktop.
This file contains 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
void Update () { | |
// ... | |
// - Body | |
// \_ - Camera | |
// Rotate full body right and left | |
transform.Rotate( | |
0, | |
Input.GetAxis("Mouse X"), | |
0 | |
); | |
// Rotate camera attached to body up and down | |
camera.transform.Rotate( | |
Input.GetAxis("Mouse Y") * -1, | |
0, | |
0 | |
); | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment