Auto-Calibration Chair Script for VRChat worlds [SDK3]
- UdonSharp Script Version¥ 600
- UdonSharp Script Version + Support me¥ 1,200
This feature calibrates the avatar position to a chair or surface to sit on in your world, so that all different sized avatars sit correctly on a chair/surface without clipping into it. It took several days of development to get it to work properly with all chairs and avatars, even more to add the bed variant. Chair calibration is based on chair surface, backrest and front edge. This chair also fixes the viewpoint issue when entering a tilted/rotated chair in VRChat. Even when you scale the chair root or any parent of it in your hierarchy, this script can handle it. It's fully networked as well. It will consider the surface, front edge and back of the chair when placing the avatar, all configurable by you per chair. Since V1.1 there is also a bed variant included, which handles desktop and VR users different (VR users are not rotated, so that they can lay in real life while laying on the bed). Please keep in mind that there are currently some issues with stations in VRChat, especially with SDK3 avatars, so the bed variant might not work flawless for everyone (unlike the chair version, which seems to work fine for AV3 and AV2). The bed version itself took another week of development and testing in which a major flaw in the UdonVM / Odin serialization was discovered. After extensively experimenting with several different approaches, the one with the least amount of avatar related issues was choosen. It's still mainly a chair related asset and the bed version was only added because a user wanted it. It is recommended that you first test out the bed version in the test world yourself if you want to use that one. Since V1.2, you can enable that users can only leave the chair by pressing ESC / the menu button on their controllers (and not by moving). This is useful e.g. for vehicles. This feature can be further enhanced with the player calibration script in your world (https://reimajo.booth.pm/items/2753511) to re-calibrate when a player changes their avatar while being on a chair, but that's optional and changing avatar while being in a station is currently not fully supported in VRChat. These chairs can be toggled (both their collider or the chair itself) with my Button & Slider asset, it's already set up correctly to work together with the auto-assign editor features! Everything was created with performance in mind, there is no update loop in this script, it's all event-based. You can test the chair script in this world: https://vrchat.com/home/world/wrld_a0210453-7f60-46d5-aa8e-612ea7097218 This script can expose useful properties to your own scripts, such as if the chair is currently occupied, if localPlayer is on the chair, and the VRCPlayerAPI of the user in the chair. As usual, you will receive all updates for free after you purchase. - UdonSharp Script Version: The only version available right now, so you will need to install the (free and awesome) UdonSharp compiler. - UdonSharp Script Version + Support me: The same like the cheaper version, but with a price that better fits the amount of time that was put into this asset. - Udon Assembly Version: Not available right now, you may want to come back later to see if I've added that As always, if you find that a certain feature is missing, please let me know. I can add more features on-demand as I did for my other products as long as it makes sense for multiple people. Your world needs to be SDK3 in order to use this. There is documentation included and the setup should be as easy as copy-pasting the provided setup. I also included contact options in case you need help setting this up after purchase. All my products are designed to be easy to use without programming knowledge. There is a guide included on how to set it up and what each setting does. Please let me know if there is a feature missing so that I can add it to this product. The UdonSharp script has a custom inspector with a detailed explanation of each setting when you hover over them, which makes it a lot easier to change settings. Source code is also included (and fully documented/explained), so you can understand how it works and modify it to your needs. You need to import UdonSharp (free C#-Udon compiler) into your project in order to use it. Programming knowledge isn't required. LICENSE: See https://reimajo.booth.pm/ -------------------------------------------------- Join the ReimajoBoothAssets Discord if you own any of my assets to receive update notifications, help & support: https://discord.gg/ZgsxQr5JNC --------------------------------------------------