Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [SerializeField] float rollSpeed = 120f;
- [SerializeField] float pitchSpeed = 90f;
- // Dans ton FixedUpdate
- float rollInput = 0f;
- float pitchInput = 0f;
- // ROLL
- if (Input.GetKey(KeyCode.Q)) rollInput = 1f;
- if (Input.GetKey(KeyCode.D)) rollInput = -1f;
- // PITCH
- if (Input.GetKey(KeyCode.Z)) pitchInput = 1f;
- if (Input.GetKey(KeyCode.S)) pitchInput = -1f;
- transform.Rotate(
- pitchInput * pitchSpeed * Time.deltaTime,
- 0f,
- rollInput * rollSpeed * Time.deltaTime,
- Space.Self
- );
Advertisement
Add Comment
Please, Sign In to add comment