Skip to main content

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

Variables

NameTypeDefaultDescription
disableAvatarScalingboolfalse
minimumHeightfloat0.2The minimum avatar eye height in meters which players can choose.
maximumHeightfloat5The maximum avatar eye height in meters which players can choose.
alwaysEnforceHeightboolfalseIf 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