File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 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
3535
3636 LeftHand = CreateDefaultSubobject<UReplicatedMotionControllerComponent>(TEXT (" Left Hand MCC" ));
3737 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);
3846}
3947
4048void ARWTHVRPawn::Tick (float DeltaSeconds)
Original file line number Diff line number Diff line change 55#include " CoreMinimal.h"
66#include " LiveLinkRole.h"
77#include " Pawn/Navigation/CollisionHandlingMovement.h"
8+
9+ #include " Components/DisplayClusterSceneComponentSyncParent.h"
10+
811#include " RWTHVRPawn.generated.h"
912
1013class UInputMappingContext ;
@@ -48,6 +51,9 @@ class RWTHVRTOOLKIT_API ARWTHVRPawn : public APawn
4851 UPROPERTY (VisibleAnywhere, BlueprintReadOnly, Category = " Pawn|Camera" )
4952 UCameraComponent* HeadCameraComponent;
5053
54+ UPROPERTY (VisibleAnywhere, BlueprintReadOnly, Category = " Pawn|Camera" )
55+ UDisplayClusterSceneComponentSyncParent* SyncComponent;
56+
5157 // LiveLink functionality
5258
5359 /* Set whether nDisplay should disable LiveLink tracking*/
You can’t perform that action at this time.
0 commit comments