Skip to content

Udon script for VRChat to link players to moving platforms.

License

Notifications You must be signed in to change notification settings

jetdog8808/Platform-Link

Repository files navigation

Platform-Link

A Udon script for VRChat to link players to moving platforms.

Video example:

2024-06-08.00-46-21-1.compressed.mp4

How it works

  • Colliders are only considered a platform if they have a Rigidbody.
  • Will only link you when you are grounded to the collider, and its layer is selected in the "linkToLayers" variable.
  • Collider and rigidbody include/exclude layers for the localplayer layer are accounted for.
  • The player will move with the platforms rigidbody positon, rotation, and scale.
  • You are able to walk and jump while linked to a platform.
  • To unlink from the platform you can either walk off the platform or be above the "unLinkDistance" from the platform.
  • There is a option to "inheriteVelocity" when unlinking from the platform, allowing you to keep your velocity from the platform.

How to setup

  • Add the Platform link prefab or PlatformLink script to your scene.
  • Select what layers to link to in the "linkToLayers" layer mask variable.
  • Enable or Disable keeping a platforms velocity when unlinked with "inheriteVelocity" bool variable.
  • Put how far above the platform you want to be to unlink from it in "unLinkDistance" float variable.

Example

Made some moving platforms you can test in this world

Notes

Have noticed some issue when moving at very high speeds, but at that point most people would get motion sick. So is unlikely you will encounter issues unless you are pushing the system.

Requirements