OculusRoomTiny(DX11) - how to combine quaternions when observor can look up/down ?
Hey all,
So, I've refactored OculusRoomTiny(DX11) to make it a little more useful.
The code is here - same license as oculus code - use it if you want for anything.
http://pastebin.com/jLA06b5m
That replaces main.cpp in the oculus OculusRoomTiny(DX11) sample project.
Controls are the same as the original, except cursor up/down now looks up down.
That's the reason for posting - looking up/down introduces a problem. As you can see, when combining the eye & observor orientations transforms now generates incorrect results.
As this is a common use scenario, I'm surprised the sample code doesn't demonstrate this.
Likely a simple quaternion math issue, but as I'm sure others have encountered and solved this, I figured I'd post the refactored code and ask for help before diving deeper.
Refactored code all yours if it's helpful.
Thanks in advance.
Best regards,
Steve.
So, I've refactored OculusRoomTiny(DX11) to make it a little more useful.
The code is here - same license as oculus code - use it if you want for anything.
http://pastebin.com/jLA06b5m
That replaces main.cpp in the oculus OculusRoomTiny(DX11) sample project.
Controls are the same as the original, except cursor up/down now looks up down.
That's the reason for posting - looking up/down introduces a problem. As you can see, when combining the eye & observor orientations transforms now generates incorrect results.
As this is a common use scenario, I'm surprised the sample code doesn't demonstrate this.
Likely a simple quaternion math issue, but as I'm sure others have encountered and solved this, I figured I'd post the refactored code and ask for help before diving deeper.
Refactored code all yours if it's helpful.
Thanks in advance.
Best regards,
Steve.
