Having trouble writing a script accessing the sensor data

Having trouble writing a script accessing the sensor data

edited 05/28/2019 - 13:07 in Bose AR SDK for Unity
jpinkl2jpinkl2 Member Posts: 8
I am trying to use the gyroscope data to control the position of an object in my Unity scene. 

I approached this by setting WearableControl.Instance.LastSensorFrame to a Vector3. i.e.:

Vector3 PositionControl = WearableControl.Instance.LastSensorFrame;

But got errors on this line. I thought this would be ok because only the gyroscope is activated (accelerometer and Rotation are unchecked) in the WearableRequirement script on this object. If the data is not in the form of a Vector3 (I thought it would be because it says "Gyroscope: Emits a Vector3 representing angular velocity in rad/s." on the 'Managing Sensors and Their Data' page), what form is it in / how can I access it?

Also ,I see in 'Managing Sensors and Their Data' that the start method must be called in Wearable Control. How is this done? (sorry for this question, I am new to Unity)

In addition, is there any example code of a similar implementation of this sensor or another? I would love to take a look. 
Sign In or Register to comment.