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:42:47 +02:00
parent 3d274c1734
commit 3393a31e5f
22 changed files with 745 additions and 52 deletions
@@ -37,11 +37,24 @@
#include "SGDebug/SGDebugVirtualHand.h"
void USGDebugVirtualHandKismetLibrary::Draw(
void USGDebugVirtualHandKismetLibrary::Draw_FXRMotionControllerData(
UObject* WorldContextObject,
const FXRMotionControllerData& MotionControllerData, const FSGVirtualHandDebuggingSettings& Settings)
const FXRMotionControllerData& MotionControllerData,
const FSGVirtualHandDebuggingSettings& Settings)
{
ensureAlwaysMsgf(WorldContextObject, TEXT("Invalid world context object!"));
PRAGMA_DISABLE_DEPRECATION_WARNINGS
FSGDebugVirtualHand::Draw(WorldContextObject->GetWorld(), MotionControllerData, Settings);
PRAGMA_ENABLE_DEPRECATION_WARNINGS
}
void USGDebugVirtualHandKismetLibrary::Draw_FXRHandTrackingState(
UObject* WorldContextObject,
const FXRHandTrackingState& HandTrackingState,
const FSGVirtualHandDebuggingSettings& Settings)
{
ensureAlwaysMsgf(WorldContextObject, TEXT("Invalid world context object!"));
FSGDebugVirtualHand::Draw(WorldContextObject->GetWorld(), HandTrackingState, Settings);
}
@@ -35,8 +35,10 @@
#pragma once
#include "UObject/ObjectMacros.h"
#include "HeadMountedDisplayTypes.h"
#include "SGKismet/SGBlueprintFunctionLibrary.h"
#include "SGDebug/SGDebugVirtualHand.h"
#include "SGDebugVirtualHandKismetLibrary.generated.h"
@@ -48,10 +50,17 @@ class SENSEGLOVEDEBUGKISMET_API USGDebugVirtualHandKismetLibrary final : public
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category="SenseGlove | Debug | Virtual Hand",
UFUNCTION(BlueprintCallable, DisplayName="Draw", Category="SenseGlove | Debug | Virtual Hand",
meta=(WorldContext="WorldContextObject"))
static void Draw(
static void Draw_FXRMotionControllerData(
UObject* WorldContextObject,
const FXRMotionControllerData& MotionControllerData,
const FSGVirtualHandDebuggingSettings& Settings);
UFUNCTION(BlueprintCallable, DisplayName="Draw", Category="SenseGlove | Debug | Virtual Hand",
meta=(WorldContext="WorldContextObject"))
static void Draw_FXRHandTrackingState(
UObject* WorldContextObject,
const FXRHandTrackingState& HandTrackingState,
const FSGVirtualHandDebuggingSettings& Settings);
};