Noa WittN

Transform not being followed

When I parent a realtime transform to a non-network transform, then the realtime transform doesn't parent and goes to vector 0 on all clients. Why would this happen?
Solution
----------------------
This issue is likely due to how Normcore handles the synchronization of
RealtimeTransform
components.
RealtimeTransform
does not track the parent of a
RealtimeTransform
and cannot synchronize it at runtime. If a
RealtimeTransform
is reparented under another game object, and that game object is destroyed, it will take the
RealtimeTransform
with it, leading to inconsistent state between clients. This could be why your
RealtimeTransform
is not following its parent and is resetting to a position of vector 0 on all clients.

Instead of reparenting, you can create an empty game object on your player character at the pick-up point. Then use a script that synchronizes the world position of the pick-up point object and the
RealtimeTransform
object that you would like to pick up. This will give you the same visual result and will avoid bugs related to reparenting.

If the
RealtimeTransform
object has a
Rigidbody
on it, make sure to use the
MovePosition()
and
MoveRotation()
methods in
FixedUpdate()
.

For more information, you can refer to the RealtimeTransform documentation (https://normcore.io/documentation/realtime/realtimetransform#extra-notes) and the Common Questions (https://normcore.io/documentation/realtime/common-questions#can-i-reparent-realtimetransform) section on the Normcore website.
----------------------
Note: you can ask me a follow up question by @ mentioning me again 💬
----------------------
Was this page helpful?