migrate away from the deprecated FXRMotionControllerData in favor of FXRMotionControllerState and FXRHandTrackingState on UE 5.5+

This commit is contained in:
Mamadou Babaei
2024-10-22 06:40:08 +02:00
parent c290b87f44
commit 29026c5d65
22 changed files with 744 additions and 51 deletions
@@ -42,5 +42,24 @@
bool USGXRTrackerKismetLibrary::GetMotionControllerData(
UObject* WorldContextObject, const EControllerHand Hand, FXRMotionControllerData& OutMotionControllerData)
{
PRAGMA_DISABLE_DEPRECATION_WARNINGS
return FSGXRTracker::GetMotionControllerData(WorldContextObject, Hand, OutMotionControllerData);
PRAGMA_ENABLE_DEPRECATION_WARNINGS
}
bool USGXRTrackerKismetLibrary::GetMotionControllerState(
UObject* WorldContextObject,
const EXRSpaceType XRSpaceType, const EControllerHand Hand, const EXRControllerPoseType XRControllerPoseType,
FXRMotionControllerState& OutMotionControllerState)
{
return FSGXRTracker::GetMotionControllerState(
WorldContextObject, XRSpaceType, Hand, XRControllerPoseType, OutMotionControllerState);
}
bool USGXRTrackerKismetLibrary::GetHandTrackingState(
UObject* WorldContextObject,
const EXRSpaceType XRSpaceType, const EControllerHand Hand,
FXRHandTrackingState& OutHandTrackingState)
{
return FSGXRTracker::GetHandTrackingState(WorldContextObject, XRSpaceType, Hand, OutHandTrackingState);
}
@@ -53,6 +53,22 @@ class SENSEGLOVETRACKINGKISMET_API USGXRTrackerKismetLibrary final : public USGB
public:
UFUNCTION(BlueprintCallable, Category="SenseGlove | Tracking | XR Tracker",
meta=(WorldContext="WorldContextObject"))
static bool GetMotionControllerData(UObject* WorldContextObject, EControllerHand Hand,
FXRMotionControllerData& OutMotionControllerData);
};
static bool GetMotionControllerData(
UObject* WorldContextObject,
EControllerHand Hand,
FXRMotionControllerData& OutMotionControllerData);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Tracking | XR Tracker",
meta=(WorldContext="WorldContextObject"))
static bool GetMotionControllerState(
UObject* WorldContextObject,
EXRSpaceType XRSpaceType, EControllerHand Hand, EXRControllerPoseType XRControllerPoseType,
FXRMotionControllerState& OutMotionControllerState);
UFUNCTION(BlueprintCallable, Category="SenseGlove | Tracking | XR Tracker",
meta=(WorldContext="WorldContextObject"))
static bool GetHandTrackingState(
UObject* WorldContextObject,
EXRSpaceType XRSpaceType, EControllerHand Hand,
FXRHandTrackingState& OutHandTrackingState);
};