Jump to content

Distance calculation


Asish

Recommended Posts

Hello guys,

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

Link to comment
Share on other sites

  • 6 months later...

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...