openvr icon indicating copy to clipboard operation
openvr copied to clipboard

Where do you input tracker poses?

Open Loeloe02 opened this issue 3 years ago • 1 comments

So I made my own trackers but I have absolutely no idea where to input the positions. I have searched the entire API and All I found was the updatepose function but there isn't any information on what and how to actually input poses.

Loeloe02 avatar Dec 31 '21 01:12 Loeloe02

You can submit poses whenever you like by calling vr::VRServerDriverHost()->TrackedDevicePoseUpdated and providing a vr::DriverPose_t struct.

There's some info on what each property of that struct does in the header file, but as a minimum, you'll want to provide both a position and an orientation to get your device tracking in space: https://github.com/ValveSoftware/openvr/blob/master/headers/openvr_driver.h#L2590

vr::DriverPose_t myPose; //fill this struct with your tracking information
vr::VRServerDriverHost()->TrackedDevicePoseUpdated(driverId_, myPose, sizeof(myPose));

danwillm avatar Dec 31 '21 12:12 danwillm