Author Topic: Quaternion orientation for oculus touch  (Read 594 times)


  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
Quaternion orientation for oculus touch
« on: December 22, 2016, 05:41:10 AM »

i'm actually building a setup for my hands, used with touch, and i have to say that i 'm understanding nothing about the way quaternions are doing there jobs.

So let's start by a simple setup of the hands and the touch:
For the oculus and touch managing, i fund OVR wich works nicelly and detect both right and left touch, also reacting to inputs without additionnal code.

for the hands,, i made mine, with bones from forearm to fingers.
if the forearm is linked to touch position and oculus orientation, it's ok, not perfect but good for a start,
for the hands, we need to get the orientation of the RightHandAnchor and LeftHandAnchor and the best setup seems to get the quaternion in local of these nodes and set the quaternion orientation of the bones of the hands.

the result is better than using Euler XYZ axis, but to manage precisely my quaternion, i'm a bit lost, my hand XYZ doesn't rotate in the good direction, so i will have to inverse Y and Z and maybe something else.

is it an action available to manage quaternion or someone that can explain me more about it ?


  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Re: Quaternion orientation for oculus touch
« Reply #1 on: February 11, 2017, 10:47:35 PM »
Quaternions are not simple or easy to understand. Unity recommends never touching them unless you are an expert.

All rotations internally in Unity are Quaternions.

So, I don't have an answer.


  • Administrator
  • Hero Member
  • *****
  • Posts: 13432
  • Official Playmaker Support
    • View Profile
Re: Quaternion orientation for oculus touch
« Reply #2 on: February 13, 2017, 11:50:35 PM »

Would it not be better to have an Inverse kinematic system here? it seems the right approach here.

 Your IK chain would follow the hands anchor position and rotation.

but just for info, to express a rotation in local coordinates, you ask unity the "localRotation", you can do so with a custom action on the Ecosystem called "GetLocalRotation".