Timeline for How do I change quaternion rotation to use the local camera axis rather than the world axis in DirectX 11?
Current License: CC BY-SA 3.0
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 5, 2017 at 8:50 | comment | added | Andrew | lookat and up vectors will have to be rotated along with the view mtx. Since the view mtx is constructed using these vectors. Otherwise as soon as you stop moving the mouse the view mtx is no longer rotated because you have 0 rotation and since you still call the LookAt function, the view matrix will be reset. Also, I suggest you use the following order of operations: build rotation matrix, rotate up and lookat, build view matrix with LookAt function. And that's it. You no longer need to rotate the view mtx itself because it has already been constructed using the rotated lookat and up vectors. | |
| Feb 4, 2017 at 18:10 | comment | added | user | Thanks for the reply! I took a look through and that's essentially what is going on. I have tried a different approach without using quaternions, but there is a small issue. Do you think you could take a look to see if you can spot the issue? I'm sure it's a relatively simple issue and perhaps I'm just missing a line, or maybe my understanding of how it works is a little off. | |
| Feb 4, 2017 at 16:29 | history | answered | Andrew | CC BY-SA 3.0 |