https://github.com/vrlabs/custom-object-sync
https://github.com/vrlabs/custom-object-sync
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/vrlabs/custom-object-sync
- Owner: VRLabs
- License: mit
- Created: 2024-01-26T17:21:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-26T19:49:16.000Z (almost 2 years ago)
- Last Synced: 2024-08-26T23:03:12.510Z (almost 2 years ago)
- Language: C#
- Size: 8.97 MB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Custom Object Sync
[](https://github.com/VRLabs/Custom-Object-Sync/releases/latest)
[](https://github.com/VRLabs/Custom-Object-Sync/blob/main/LICENSE)
[](https://img.shields.io/badge/Quest-Compatible-green?logo=Meta)
[](https://unity.com/releases/editor/whats-new/2022.3.22)
[](https://vrchat.com/home/download)
[](https://discord.vrlabs.dev/)
[](https://patreon.vrlabs.dev/)
Sync objects across the network with custom range, precision, and parameter usage.

### ⬇️ [Download Latest Version](https://github.com/VRLabs/Custom-Object-Sync/releases/latest)
### 📦 [Add to VRChat Creator Companion](https://vrlabs.dev/packages?package=dev.vrlabs.custom-object-sync)
---
## How it works
* Contacts and Physbones read the location and rotation of your object(s).
* Parameter Drivers convert this location and rotation into boolean values.
* Those boolean values are synced over the network in multiple steps. Choosing more steps means we can use fewer parameters.
* Once the values arrive at the remote side, they get converted back into floats.
* These floats get used to set the object back in its place on the remote side.
* This can be useful when:
* You want to late sync a world drop.
* You want to fly an object around and have it sync reliably.
* You have an object that moves based on some local-only/fps dependent mechanism.
## Install guide
https://github.com/VRLabs/Custom-Object-Sync/assets/76777936/4d12a815-bb1f-4c03-b0fc-83f9ea98638a
* Click `VRLabs -> Custom Object Sync` at the top of the screen.
* Drag the object you want to sync into the `Objects to Sync` field.
* Adjust the values until you're happy with them:
* Add Local Debug View: Adds a toggle to view the object's remote position and rotation.
* Quick Sync:
* Position Precision: The position precision to be synced. Since this sync mode syncs floats, Position Precision also affects Range, and Rotation Precision is locked at 1 float per axis.
* Non Quick Sync:
* Position Precision: Precision of the synced object's Position.
* Rotation Precision: Precision of the synced object's Rotation.
* Radius: Radius of the sync. For more information, see `Sync Type`
* Bits per Sync: Amount of bits per sync step. Lower bits means longer before the full object is synced, but also less parameter usage.
* Enable Rotation Sync: Whether or not rotation should be Synced.
* Sync Type: Whether or not the sync should be based on avatar root or on world origin.
* Avatar Centered: The sync is based off of a point which is dropped when-ever you start the sync. This means you can use way lower range, but also it won't late sync.
* This is forced for quick sync.
* World Centered: The sync is based off of world origin. This means you'll need a big range to support big worlds, but it will late sync.
* Add Damping Constraint to Object: Whether or not the remote object should be damped. This means the object moves to its new position smoothly whenever it receives a new position.
* Damping value: How the damping behaves: 0 = don't move at all. 1 = move to the new position very fast.
* Press Generate Custom Sync
> [!NOTE]
> When building for Quest, you will have to remove unsupported components and shaders
## How to use
* Enable the `CustomObjectSync/Enabled` bool to start the sync.
* Now the location of the Target objects will be synced over the network.
## Performance stats
Rotation Sync:
```c++
Constraints: 11-13 + 3 per object
Contact Receivers: 6
Contact Senders: 3
FX Animator Layers: 2 + 2 per object
Phys Bones: 6
Phys Bone Colliders: 3
Rigidbodies: 1
Joints: 1
Expression Parameters: 1-256
```
No Rotation Sync:
```c++
Constraints: 11-13 + 3 per object
Contact Receivers: 6
Contact Senders: 3
FX Animator Layers: 2 + 1 per object
Rigidbodies: 1
Joints: 1
Expression Parameters: 1-256
```
## Hierarchy layout
Rotation Sync:
```html
Custom Object Sync
|-Target
|-Measure
| |-Position
| | |-SenderX
| | |-SenderY
| | |-SenderZ
| | |-Receiver X+
| | |-Receiver X-
| | |-Receiver Y+
| | |-Receiver Y-
| | |-Receiver Z+
| | |-Receiver Z-
| |-Rotation
| | |-Measure Bones
| | | |-Measure X Magnitude
| | | |-Measure X Sign
| | | |-Measure Y Magnitude
| | | |-Measure Y Sign
| | | |-Measure Z Magnitude
| | | |-Measure Z Sign
| | |-Measure Planes
| | | |-X Angle Plane
| | | |-Y Angle Plane
| | | |-Z Angle Plane
|-Set
| |-Result
```
No Rotation Sync:
```html
Custom Object Sync
|-Target
|-Measure
| |-Position
| | |-SenderX
| | |-SenderY
| | |-SenderZ
| | |-Receiver X+
| | |-Receiver X-
| | |-Receiver Y+
| | |-Receiver Y-
| | |-Receiver Z+
| | |-Receiver Z-
|-Set
| |-Result
```
## Contributors
* [jellejurre](https://github.com/jellejurre)
## License
Custom Object Sync is available as-is under MIT. For more information see [LICENSE](https://github.com/VRLabs/Custom-Object-Sync/blob/main/LICENSE).
[
](https://vrlabs.dev "VRLabs")
[
](https://discord.vrlabs.dev/ "VRLabs")
[
](https://patreon.vrlabs.dev/ "VRLabs")
[
](https://twitter.com/vrlabsdev "VRLabs")