ChilloutVR

ChilloutVR

Not enough ratings
Customizable Size Slider for Avatars
By Fire
This guide will teach you how to add a slider to your avatar that can control the avatar's size.
   
Award
Favorite
Favorited
Unfavorite
Custom Slider For Avatar Size
If you have an avatar setup for CVR, what you need to do is first clone your existing prefab. We will need to make changes and test our configurations and it's best we do it on an object we can throw away after we finish.

After a clone has been made, click main root of the object and remove all components except for the "Transform" component.

Next, make sure you have the "Animation" tab at the bottom visible. If you dont have it, go to Window -> Animation -> Animation

Then click on "Animation" tab and click "Create", and save the file. We will create 2 files. One for increasing the avatars size, and one for decreasing. First let's create the one for decreasing the size.

Then click the red button in the animation window

and change the avatar's scale in transform in the inspector window. Make sure to click the red button once you finish making your changes to have it stop recording your actions and save.

Values you change in inspector should appear in the "Animation" tab. Make sure to not make your avatar too small or it might cause issues when you attempt to interact with anything.

To create another file for increasing the size of the avatar click on the dropdown in the "animation" tab.

Click on the red button to record again, but this time increasing the scale values. Save the new script once done.

After the two animations are made, go back to the orignal avatar model. From here enable "Enable Advanced Settings" if it's not already enabled.
Then click on the + in the Inputs.

Set a name for the new input (this will be the name that appears in the advanced avatar settings ingame). Then change the type to a slider.

From here, change the default value so you dont start too large or small. Then click the "Use Animation" toggle. This will make two inputs to appear. One for "Min Clip" and one for "Max Clip". Click the "Min Clip" and select the animation we created for the small size. Do the same for the "Max Clip".

After this is setup, feel free to upload your avatar with adjustable size.

Lastly, make sure to enable "Alternative Rescale" in the Experimental settings when you go ingame.
1 Comments
Momofier Dec 21, 2022 @ 3:40pm 
Don't use a Slider. When you re-scale the Slider will not be stable.

Input Single or Drop Down would both be more accurate for use and you don't risk making yourself too small on accident if your scaler allows it.

Input Single Allows you to set a Value like you would With a slider but you won't have to also worry about the menu being taken from under you for placing a value that slipped.

slider itself will Slip due to the menu often staying in place compared to body.