Avatar Scaling Settings
This UdonBehaviour example script allows you easily to override your world's avatar scaling settings.
To learn how to write your own Udon script for avatar scaling, read our avatar scaling documentation.
![avatar-scaling-example-component.png](/assets/avatar-scaling-example-component.C2LMm3UC.png)
Variables
Name | Type | Default | Description |
---|---|---|---|
disableAvatarScaling | bool | false | |
minimumHeight | float | 0.2 | The minimum avatar eye height in meters which players can choose. |
maximumHeight | float | 5 | The maximum avatar eye height in meters which players can choose. |
alwaysEnforceHeight | bool | false | If enabled, players who switch to use a very tall or very short avatar will automatically be set to "minimumHeight" or "maximumHeight". |
Examples
- I want players to use avatar scaling freely.
- You don't need to change any settings.
- I don't want players to use avatar scaling.
- Turn on "disableAvatarScaling."
- I want players to use a specific avatar height.
- Set "minimumHeight" and "maximumHeight" how you prefer.
- If you want to prevent very tall or very short avatars, enable "alwaysEnforceHeight".
Here's what the Udon Graph for the example script looks like:
![avatar-scaling-example-component.png](/assets/avatar-scaling-example-graph.DkM6tIqq.png)