From e31ba9ffc21d50b13170759578aee452115cd701 Mon Sep 17 00:00:00 2001
From: David Gilbert <david.gilbert@rwth-aachen.de>
Date: Wed, 29 Nov 2023 18:01:09 +0100
Subject: [PATCH] docs(pawn): adds some more comments on qhy we need sync comp
---
Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp b/Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp
index 721823fe..c6653b37 100644
--- a/Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp
+++ b/Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp
@@ -36,7 +36,10 @@ ARWTHVRPawn::ARWTHVRPawn(const FObjectInitializer& ObjectInitializer) : Super(Ob
LeftHand = CreateDefaultSubobject<UReplicatedMotionControllerComponent>(TEXT("Left Hand MCC"));
LeftHand->SetupAttachment(RootComponent);
- // add a nDisplay
+ // Add an nDisplay Parent Sync Component. It syncs the parent's transform from master to clients.
+ // This is required because for collision based movement, it can happen that the physics engine
+ // for some reason acts different on the nodes, therefore leading to a potential desync when
+ // e.g. colliding with an object while moving.
SyncComponent =
CreateDefaultSubobject<UDisplayClusterSceneComponentSyncParent>(TEXT("Parent Display Cluster Sync Component"));
SyncComponent->SetupAttachment(RootComponent);
--
GitLab