Welcome to ChilloutVR!
I'm Shin, also known as Shinter!
I love creating tutorials for people to learn about Unity and Blender.
and I believe ChilloutVR needs more content for players to enjoy in public lobbies!
This guide is for individuals that are new to Unity and who followed the Fearless7's Basic Props Tutorial this is very beginner friendly, and this should be able to get your prop attachable.
If something is very confusing feel free to DM me on Discord Shinter#6986 (Please Refer to this Guide before sending me a message!) or reply to my topic and I'll gladly answer any issues you may face.
ChilloutVR Content Creation Kit 3.0
An object you want to attach(in my case it's a flag)
Already setup prop by following Fearless7's tutorial.
Let's start with a game object already in the scene and ready to be attached, in my case it is a flag.
In here I have already setup MagicaBoneCloth on the flag and textures and CVR components needed to upload as this is a prop ready to be attached, If you would like to learn how to upload a prop or get started with a prop I recommend visiting Fearless7's Basic Props Tutorial
Lets now start by adding the CVR Attachment (Script) into the root of the game object (the one with the CVR Spawnable)
Once it has been added it would look very overwhelming, but this guide is here to help you understand how to use the CVR Attachment (Script).
Lets start by setting some things with the CVR Attachment script, such as Attachment Type to Bone(I want to attach my flag to a bone)
And for the Bone Type, I want it to be able to be attached to the Chest so I selected the following:
And for the Tracker Type I have set it to HMD.
Next you want to change the Max Attachment Distance to small values, I would use 0.2 or 0.4 or 0.5, but in this guide I'll be setting it to 0.5
After you have fully set up your CVR Attachment Script, you now have to add a component called CVR Interactable
and do the following setup as in this picture
In the Method Call Action Type, put the same game object where you put the CVR Attachment in, and you should be able to select CVRAttachment > Attach ()
In game, you will be able to use VR and drop the object, it should attach to the nearest "Bone Type" you included, and if you grab it and move it away from your chest bone it should de-attach.
If you want to create a desktop version of this, it would be pretty difficult to attach the prop to yourself, but I'll update this guide if there's a more reasonable method of attaching something to yourself without VR.
You should be able to upload the prop and see it working!
If this guide helped you please drop a like below, or if you had trouble following this tutorial, You may DM me on Discord at Shinter#6986 or reply to this topic.