4 Replies
Hi @MasterOX 水. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Yes, a
Vector3
can be synced in a model in NormalVR. According to the documentation (https://normcore.io/documentation/room/common-questions#when-i-try-to-sync-a-specific-object-to-the-datastore-i-get-an-error-that-says-it-cannot-be-serialized-whats-the-issue), only primitives such as int
, float
, Vector3
, string
, etc. can be serialized.
Here is an example of a Vector3
being synced in a model:
In this example, _movementVelocity
is a Vector3
that is being synced. The RealtimeProperty
attribute is used to indicate that this field should be synced. The first argument to RealtimeProperty
is the property's unique ID, and the second argument indicates whether the property should be reliably synced. If it's set to true
, the property will always be synced reliably. If it's set to false
, the property will only be synced if it changes.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@758040514678489279> kapa.ai is still learning and improving, please let us know how it did by reacting below
Yes, any primitive along with some basic Unity types can be synced
RealtimeTransform uses it for Position / Scale
thank you