Forum Discussion
stevew
10 years agoHonored Guest
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.
6 Replies
- 2EyeGuyAdventurerOrder matters when combining rotations.
- stevewHonored Guestthanks. tried it the other way too. didn't work either. confused.com
surely this should be demonstrated in the SDK or is first person up/down considered to be a headset only feature. regardless, would be nice to have the maths working. - stevewHonored Guest@moderator - posted this in wrong group. please delete. have moved to pc development.
- cyberealityGrand ChampionYeah, I can move to the dev section. In any case, controlling up/down looking with mouse or keyboard is a thing you should be very careful about doing in VR as it alters the horizon level and can be uncomfortable to viewers.
- stevewHonored Guestedit: fixed.
- stevewHonored Guestresolved. must have been too tired yesterday. turns out quaternions work as expected. sorry - this can go :)
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 12 years ago
- 11 years ago