Guribo / UdonVehicleSync

Smooth, predictive synchronization for rigidbody based vehicles for VRChat worlds.
https://guribo.github.io/TLP
MIT License
3 stars 0 forks source link

Use editor script to simplify setup #1

Open techanon opened 5 months ago

techanon commented 5 months ago

There should be an included build script that searches the world scene for both the TLP_SyncOrigin and TLP_NetworkTime objects, and if either are not found, implicitly add them to the scene as needed. Then search for any requisite scripts of the TLP_UdonVehicleSync objects, and assign the sync and time references as needed. It should also search through hierarchy parents of the VelocityProvider script to find a rigidbody and assign the ToTrack automatically if it's not explicitly provided.

Guribo commented 5 months ago

I will simplify it like I do on the SaccFlightAdapter that does everything for you. I won't be able to automatically setup everything because the intention is to have the sync origin be anything to sync something in a specific local space of another transform. So I can't generalize and say everything is relative to the global TLP_SyncOrigin. That is only partially implemented currently though.

techanon commented 5 months ago

The 'as needed' comment was mostly referring to "if the Relative To slot is null, insert the automatically added Sync Origin object". Clearly if the user defines a custom relative space, it should not be overwritten.

techanon commented 5 months ago

I would also add that in the setup directions, the Target reference on the Receiver object is not mentioned, but it is required otherwise the script crashes, so you'll want to add that to the readme.