Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. var player = GameObject.Find("Player");
  2.  
  3. // Rotation de la caméra quand la touche alt est enfoncé
  4. if (Input.GetKey(KeyCode.LeftAlt)){
  5. print("alt down");
  6. transform.Rotate(0, Input.GetAxisRaw("Mouse X"), 0);
  7. }else if (Input.GetKeyUp(KeyCode.LeftAlt)){ // Reset de la rotation
  8. print("alt up");
  9. print(player.transform.rotation);
  10. transform.Rotate(player.transform.rotation);
  11.  
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement