Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var player = GameObject.Find("Player");
- // Rotation de la caméra quand la touche alt est enfoncé
- if (Input.GetKey(KeyCode.LeftAlt)){
- print("alt down");
- transform.Rotate(0, Input.GetAxisRaw("Mouse X"), 0);
- }else if (Input.GetKeyUp(KeyCode.LeftAlt)){ // Reset de la rotation
- print("alt up");
- print(player.transform.rotation);
- transform.Rotate(player.transform.rotation);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement