Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Combining Quaternions for vehicle + VR rotations

Author
Message
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 8th Jan 2017 17:17 Edited at: 8th Jan 2017 17:19
Hello,

I encountered a problem to compute 2 rotations for a VR game.

Imagine a driver in a car. i have to cumulate the rotation of the car itself (the "parent" rotation) with the rotation of the head's driver (via the GetRawRotationVectorW2,X2,Y2,Z2 commands).

so i try to multiply quaternions getting the camera quaternion (GetCameraQuatW,X,Y,Z commands) before getting the head quaternions and compute them using this formula (non-commutative so i tried to inverse quat1 & 2 but it's resulting in the same behaviour) :



but the resulting quaternion seems to make my camera totally uncontrollable

i'm missing something but what ?
--------------------------------
Join us on dedicated AppGameKit WeeKChat :
https://week.chat/room/AppGameKit
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 8th Jan 2017 18:00
Ho sorry, my calculations was good ... but i have forgotten to save the camera rotation BEFORE VR rotations and restart from it at each frame

So everything is OK
--------------------------------
Join us on dedicated AppGameKit WeeKChat :
https://week.chat/room/AppGameKit

Login to post a reply

Server time is: 2024-09-29 21:21:41
Your offset time is: 2024-09-29 21:21:41