diff options
author | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2022-06-14 07:33:03 -0700 |
---|---|---|
committer | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2022-06-14 07:33:22 -0700 |
commit | 10131eb6f266db29f1f8eda021d7bd263b2c686c (patch) | |
tree | 808ac3f62f2a631e50a001a16bdb28972063c994 /modules/openxr/openxr_api.cpp | |
parent | 706dc74e01e1900af947d7a5fe854603a3df18b1 (diff) | |
download | redot-engine-10131eb6f266db29f1f8eda021d7bd263b2c686c.tar.gz |
Expose XRPose's get angular velocity.
Diffstat (limited to 'modules/openxr/openxr_api.cpp')
-rw-r--r-- | modules/openxr/openxr_api.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/openxr/openxr_api.cpp b/modules/openxr/openxr_api.cpp index f42af0492f..d8d3bacb19 100644 --- a/modules/openxr/openxr_api.cpp +++ b/modules/openxr/openxr_api.cpp @@ -1102,7 +1102,7 @@ Size2 OpenXRAPI::get_recommended_target_size() { return target_size; } -XRPose::TrackingConfidence OpenXRAPI::get_head_center(Transform3D &r_transform, Vector3 &r_linear_velocity, const Vector3 &r_angular_velocity) { +XRPose::TrackingConfidence OpenXRAPI::get_head_center(Transform3D &r_transform, Vector3 &r_linear_velocity, Vector3 &r_angular_velocity) { XrResult result; ERR_FAIL_COND_V(!running, XRPose::XR_TRACKING_CONFIDENCE_NONE); @@ -1730,7 +1730,7 @@ XRPose::TrackingConfidence OpenXRAPI::transform_from_location(const XrHandJointL return _transform_from_location(p_location, r_transform); } -void OpenXRAPI::parse_velocities(const XrSpaceVelocity &p_velocity, Vector3 &r_linear_velocity, Vector3 r_angular_velocity) { +void OpenXRAPI::parse_velocities(const XrSpaceVelocity &p_velocity, Vector3 &r_linear_velocity, Vector3 &r_angular_velocity) { if (p_velocity.velocityFlags & XR_SPACE_VELOCITY_LINEAR_VALID_BIT) { XrVector3f linear_velocity = p_velocity.linearVelocity; r_linear_velocity = Vector3(linear_velocity.x, linear_velocity.y, linear_velocity.z); @@ -2303,7 +2303,7 @@ Vector2 OpenXRAPI::get_action_vector2(RID p_action, RID p_tracker) { return result_state.isActive ? Vector2(result_state.currentState.x, result_state.currentState.y) : Vector2(); } -XRPose::TrackingConfidence OpenXRAPI::get_action_pose(RID p_action, RID p_tracker, Transform3D &r_transform, Vector3 &r_linear_velocity, const Vector3 &r_angular_velocity) { +XRPose::TrackingConfidence OpenXRAPI::get_action_pose(RID p_action, RID p_tracker, Transform3D &r_transform, Vector3 &r_linear_velocity, Vector3 &r_angular_velocity) { ERR_FAIL_COND_V(session == XR_NULL_HANDLE, XRPose::XR_TRACKING_CONFIDENCE_NONE); Action *action = action_owner.get_or_null(p_action); ERR_FAIL_NULL_V(action, XRPose::XR_TRACKING_CONFIDENCE_NONE); |