Jump to content

Obtaining HMD Position/Rotational values


Recommended Posts

I'm working on a research project for my university which involves making the environment appear to be spinning around the camera (like in those fun house tunnel hallways).  We're using the HTC Vive Focus Plus and Unity 2019.4

Currently I grab the positional/rotational data using the WaveVR head object, which works for any scenarios that aren't moving or otherwise.  But when I begin having the view spin, the positions my code gets from the WaveVR head object *also* spin.  See attachment; this was done by grabbing the positionals from the WaveVR Head, while the Vive Focus Plus was sitting completely still on table.  To make the illusion of the scene spinning, I attached the WaveVR as a child of a object called Body and spin the Body.  I use localPosition to get the data from the WaveVR Head object.  In editor, the data comes out correct, and the WaveVR head object also does not move at all; however in the actual device, even if the HMD is not moving, the data I get shows some degree of movement.

Due to another test, the idea of having a body to rotate or counteract movement from the HMD is necessary, so instead is there a better way to gather positional/rotational data directly from the HMD/WaveSDK rather then relying on the transforms of an in-scene camera?

@Corvus @Tony PH Lin


Link to comment
Share on other sites

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