The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

st/oxr: Set position to identity and zero velocities if the spaces are locatable

authored by

Jakob Bornecrantz and committed by
Jakob Bornecrantz
798932fb 291e7957

+15
+15
src/xrt/state_trackers/oxr/oxr_space.c
··· 429 429 bool has_pure_relation = get_pure_space_relation(log, spc, baseSpc, time, &pure); 430 430 if (!has_pure_relation) { 431 431 location->locationFlags = 0; 432 + 433 + // Copy 434 + union { 435 + struct xrt_pose xrt; 436 + XrPosef oxr; 437 + } safe_copy = {XRT_POSE_IDENTITY}; 438 + location->pose = safe_copy.oxr; 439 + 440 + XrSpaceVelocity *vel = (XrSpaceVelocity *)location->next; 441 + if (vel) { 442 + vel->velocityFlags = 0; 443 + U_ZERO(&vel->linearVelocity); 444 + U_ZERO(&vel->angularVelocity); 445 + } 446 + 432 447 return XR_SUCCESS; 433 448 } 434 449