ALVR icon indicating copy to clipboard operation
ALVR copied to clipboard

Quaternion input for ALVRFreePIE

Open TyborAUT opened this issue 8 years ago • 1 comments

I'm playing around with PS Move Controllers and PS Move FreePIE Bridge as input to ALVR. As you also commented here (https://github.com/polygraphene/ALVR/issues/110#issuecomment-403046288) this Euler & Quaternion mathematics just give head ache :-)

I got it working a little bit by using the correct yaw, pitch & roll values through a freepie script. But experienced strange rotation when reaching 90° roll. I then looked into the source of PSMoveFreePIEBridge and found out, that it uses a different euler order in the conversion function than what is used in ALVR! I quickly replaced the quaternion to euler conversion in PSMoveFreePIEBridge with that of ALVR and got it working!

During my search for this problem, all sources suggest to use quaternions instead of euler rotations. This solves several problems of euler angles (wrong order, gimbal lock, etc.).

So please implement an option to input a quaternion instead of euler angles for ALVR through FreePIE.

greets, Tybor

TyborAUT avatar Sep 24 '18 17:09 TyborAUT

@TyborAUT maybe it was my problem too, can you look and help me with #185

DavidJelinek avatar Sep 25 '18 08:09 DavidJelinek