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:30:22 +02:00
parent 2523b54a91
commit dfdb6017dc
@@ -1163,9 +1163,28 @@ bool FSGXRTracker::GetMotionControllerData(
{
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(
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(
!OutMotionControllerData.bValid