Jump to content

Recommended Posts

Posted

I want to get the position of the headset in order to decide if someone nodded or shaked his/her head.

Anyone has any idea how I get the position data/values of the headset? Do I need any specific gameObjects?

 

  • 4 weeks later...
  • 1 year later...
Posted

@Asish Depends on your setup, your engine, etc... Most Unity devs would take their VR camera rig and then script against it to create variables they can then apply conversions on to get an output of an quaternon, a euler angle, or a rotation matrix. It really depends on what your project looks like and how much error is allowable since quaternon or Euler angles will introduce conversion error, especially Euler conversions.

Note that it's particularly a rabbit hole in Unity that can be headache inducing. Here are some posts which may help lead you down a working approaching.

 

  •  
  • 4 months later...
Posted

Hello @Corvus @HackPerception

I'm trying to calculate distance between gaze_origin(provided by API) and the target object using following code but the units are not same for these two points. So, how to get same type of coordinate system? 

var d = GameObject.Find("CubeObject").transform.position;

 var combine_gaze = eyeData.verbose_data.combined.eye_data.gaze_origin_mm;

 float dist = Vector3.Distance(d, combine_gaze);

 

Thanks in advance

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...