I tried many times, but I can't get the result what I want.
my rotation logic is like this.
- if mouse move to left or right, then rotate yaw. if mouse moves to up or down, rotate pitch.
- Mouse can moves to diagonal direction. so in this case I will get two quarternions. (pitch and yaw)
- I don't know how to compose these two quaternions.
when I use just one rotation pitch or yaw, It works like what I want. but if I use two rotations pitch and yaw, the result is something wrong.
I tried many ways to compose quaternions.. but I can't reach the result what I want.