Sticky Surface
I put together an Udon graph to make axes stick to trees in Pearl's Cabin: https://vrchat.com/home/world/wrld_2a1d857f-3bbb-4642-b8cb-fd13d696cc18
It's pretty simple stuff, but I figured people might be interested in adding it to their own worlds, so I modeled a few low poly pickups, streamlined the script a bit, set up some targets and packaged it up.
This prefab requires VRCSDK3 for Worlds and Unity.
Always reference the VRChat docs for the latest requirements.
https://unity3d.com/get-unity/download/archive
https://vrchat.com/home/download
Note: The reset button uses a script by JetDog, available here:
https://github.com/jetdog8808/Jetdogs-Prefabs-Udon/releases
How does it work?
You start with a synchronized vrc pickup object, then add a child object. The child object should have a collider set as a trigger. Position that where the pickup should be 'sticky'. Add the StickySurface
script to the child object and set one or more targets. Make sure your target objects have a collider and that's it, you can toss things around and if they're sticky bits meet a target, they'll freeze in place.
Features:
- Works in VRChat
- Includes custom made low poly models
Support:
You can contact me via discord.mdcr.tv