silence another ue 5.5 deprecation warning with a temporary workaround for the time being

This commit is contained in:
Mamadou Babaei
2024-10-11 12:14:50 +02:00
parent 922de02294
commit 2a62e1c1a9
@@ -1163,9 +1163,28 @@ bool FSGXRTracker::GetMotionControllerData(
{ {
OutMotionControllerData.DeviceVisualType = EXRVisualType::Hand; OutMotionControllerData.DeviceVisualType = EXRVisualType::Hand;
/// TODO
// This is a just a temporary workaround to silence a UE 5.5 deprecation warning.
// Should be refactored with a proper implementation when migrating away from the deprecated
// `FXRMotionControllerData` in favor of newly introduced
// `FXRMotionControllerState` and `FXRHandTrackingState` structs.
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 5
bool bTracked = false;
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 5 */
OutMotionControllerData.bValid = HandTracker->GetAllKeypointStates( OutMotionControllerData.bValid = HandTracker->GetAllKeypointStates(
Hand, OutMotionControllerData.HandKeyPositions, OutMotionControllerData.HandKeyRotations, Hand, OutMotionControllerData.HandKeyPositions, OutMotionControllerData.HandKeyRotations,
OutMotionControllerData.HandKeyRadii); OutMotionControllerData.HandKeyRadii
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 5
, bTracked
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 5 */
);
#if ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 5
if (!bTracked)
{
return false;
}
#endif /* ENGINE_MAJOR_VERSION >= 5 && ENGINE_MINOR_VERSION >= 5 */
if (!ensureAlwaysMsgf( if (!ensureAlwaysMsgf(
!OutMotionControllerData.bValid !OutMotionControllerData.bValid