File tree 2 files changed +14
-0
lines changed 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,14 @@ ARWTHVRPawn::ARWTHVRPawn(const FObjectInitializer& ObjectInitializer) : Super(Ob
35
35
36
36
LeftHand = CreateDefaultSubobject<UReplicatedMotionControllerComponent>(TEXT (" Left Hand MCC" ));
37
37
LeftHand->SetupAttachment (RootComponent);
38
+
39
+ // Add an nDisplay Parent Sync Component. It syncs the parent's transform from master to clients.
40
+ // This is required because for collision based movement, it can happen that the physics engine
41
+ // for some reason acts different on the nodes, therefore leading to a potential desync when
42
+ // e.g. colliding with an object while moving.
43
+ SyncComponent =
44
+ CreateDefaultSubobject<UDisplayClusterSceneComponentSyncParent>(TEXT (" Parent Display Cluster Sync Component" ));
45
+ SyncComponent->SetupAttachment (RootComponent);
38
46
}
39
47
40
48
void ARWTHVRPawn::Tick (float DeltaSeconds)
Original file line number Diff line number Diff line change 5
5
#include " CoreMinimal.h"
6
6
#include " LiveLinkRole.h"
7
7
#include " Pawn/Navigation/CollisionHandlingMovement.h"
8
+
9
+ #include " Components/DisplayClusterSceneComponentSyncParent.h"
10
+
8
11
#include " RWTHVRPawn.generated.h"
9
12
10
13
class UInputMappingContext ;
@@ -48,6 +51,9 @@ class RWTHVRTOOLKIT_API ARWTHVRPawn : public APawn
48
51
UPROPERTY (VisibleAnywhere, BlueprintReadOnly, Category = " Pawn|Camera" )
49
52
UCameraComponent* HeadCameraComponent;
50
53
54
+ UPROPERTY (VisibleAnywhere, BlueprintReadOnly, Category = " Pawn|Camera" )
55
+ UDisplayClusterSceneComponentSyncParent* SyncComponent;
56
+
51
57
// LiveLink functionality
52
58
53
59
/* Set whether nDisplay should disable LiveLink tracking*/
You can’t perform that action at this time.
0 commit comments