Eonirr

Untitled

Dec 22nd, 2025 (edited)
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. [SerializeField] float rollSpeed = 120f;
  2. [SerializeField] float pitchSpeed = 90f;
  3.  
  4. // Dans ton FixedUpdate
  5. float rollInput = 0f;
  6. float pitchInput = 0f;
  7.  
  8. // ROLL
  9. if (Input.GetKey(KeyCode.Q)) rollInput = 1f;
  10. if (Input.GetKey(KeyCode.D)) rollInput = -1f;
  11.  
  12. // PITCH
  13. if (Input.GetKey(KeyCode.Z)) pitchInput = 1f;
  14. if (Input.GetKey(KeyCode.S)) pitchInput = -1f;
  15.  
  16. transform.Rotate(
  17. pitchInput * pitchSpeed * Time.deltaTime,
  18. 0f,
  19. rollInput * rollSpeed * Time.deltaTime,
  20. Space.Self
  21. );
Advertisement
Add Comment
Please, Sign In to add comment