Adding a tracking confidence state to XRPose
This commit is contained in:
@ -181,6 +181,7 @@ void MobileVRInterface::set_position_from_sensors() {
|
||||
orientation = rotate * orientation;
|
||||
|
||||
tracking_state = XRInterface::XR_NORMAL_TRACKING;
|
||||
tracking_confidence = XRPose::XR_TRACKING_CONFIDENCE_HIGH;
|
||||
};
|
||||
|
||||
///@TODO improve this, the magnetometer is very fidgety sometimes flipping the axis for no apparent reason (probably a bug on my part)
|
||||
@ -193,6 +194,7 @@ void MobileVRInterface::set_position_from_sensors() {
|
||||
orientation = Basis(transform_quat);
|
||||
|
||||
tracking_state = XRInterface::XR_NORMAL_TRACKING;
|
||||
tracking_confidence = XRPose::XR_TRACKING_CONFIDENCE_HIGH;
|
||||
} else if (has_grav) {
|
||||
// use gravity vector to make sure down is down...
|
||||
// transform gravity into our world space
|
||||
@ -512,7 +514,7 @@ void MobileVRInterface::process() {
|
||||
|
||||
if (head.is_valid()) {
|
||||
// Set our head position, note in real space, reference frame and world scale is applied later
|
||||
head->set_pose("default", head_transform, Vector3(), Vector3());
|
||||
head->set_pose("default", head_transform, Vector3(), Vector3(), tracking_confidence);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user