MasterOX 水
MasterOX 水2mo ago

box collider sync

will the size and center of a box collider sync if the gameobject that has the box collider attached to it also has realtime transform
7 Replies
kapa.ai
kapa.ai2mo ago
Hi @MasterOX 水. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The RealtimeTransform component in NormalVR is used to synchronize the position, rotation, and scale of a GameObject. However, it does not explicitly mention the synchronization of other components such as a Box Collider. If you want to synchronize the size and center of a Box Collider, you might need to create a custom RealtimeComponent that handles this. Normcore provides a rich API for creating your own realtime components. Remember, child game objects with RealtimeTransform and Collider components are perfectly fine as long as they do not have a Rigidbody component on them. For more information, you can refer to the RealtimeTransform (https://normcore.io/documentation/realtime/realtimetransform) and RealtimeComponent (https://normcore.io/documentation/realtime/realtimecomponent) documentation. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@758040514678489279> kapa.ai is still learning and improving, please let us know how it did by reacting below
MasterOX 水
MasterOX 水2mo ago
@Normcore Assistant can you list me everything that can be synced in a model?
kapa.ai
kapa.ai2mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- A RealtimeModel in Normcore is designed to synchronize data that can be easily serialized and transmitted to other clients. Each field in a RealtimeModel is required to be a primitive type. Here are some examples of what can be synced in a model: - Strings - Colors - Vector3 Here's an example of what a typical RealtimeModel might look like:
[RealtimeModel]
public partial class MyModel {
[RealtimeProperty(1, true )] private string _name;
[RealtimeProperty(2, true )] private Color _avatarPrimaryColor;
[RealtimeProperty(3, true )] private Color _avatarAlternateColor;
[RealtimeProperty(4, false)] private Vector3 _movementVelocity;
}
[RealtimeModel]
public partial class MyModel {
[RealtimeProperty(1, true )] private string _name;
[RealtimeProperty(2, true )] private Color _avatarPrimaryColor;
[RealtimeProperty(3, true )] private Color _avatarAlternateColor;
[RealtimeProperty(4, false)] private Vector3 _movementVelocity;
}
It's important to note that it's not possible to store a complex object, such as a Material or Texture, in a model. You'll need to pick out the pieces of data you would like to synchronize and use a RealtimeModel to synchronize them. Attempting to synchronize every public property of such an object would require too much bandwidth to do correctly, and in most cases, the values do not change very often. For more information, you can refer to the RealtimeModel (https://normcore.io/documentation/room/realtimemodel) documentation. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@758040514678489279> kapa.ai is still learning and improving, please let us know how it did by reacting below
Mechabit
Mechabit2mo ago
realtime transform can sync scale so if the box collider has a RT on it you can scale the game object if you just want to scale the box collider bounds / center you'll need to do a custom model for it
MasterOX 水
MasterOX 水2mo ago
yeah, i did a custom model, ty!