Wednesday, November 16, 2022
HomeGame Developmentc++ - Calculate the Proper and Up vectors utilizing yaw and pitch...

c++ – Calculate the Proper and Up vectors utilizing yaw and pitch in right-handed coordinates


I’ve an task the place they ask me to calculate Vector Proper and Vector Up, it is for a digital camera creation utilizing C++ and DirectX. For the Vector Proper, they specify I ought to use 90-yaw, so I acquired:

$ V_{Proper} = {cos(90-yaw), 0, sin(90-yaw)}. $

For Vector Up, I am nonetheless unsure how ought to I calculate it utilizing yaw and pitch. My preliminary thought was to set it like this:

$ V_{Up} = {cos(yaw) * cos(pitch), sin(pitch), sin(yaw) * cos(pitch)}. $

Nevertheless, I feel I am complicated it with the Ahead Vector. I do know I can get a rotation matrix and use additionally cross merchandise to acquire them, however they specify that I ought to use yaw and pitch and I am kinda misplaced right here since can’t discover a clear reply with the setup I am mentioning.

Might you assist me to seek out the Up, Proper and Course vectors? (I suppose the route is the Ahead one.)

Any assist could be helpful!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments