Default values for int expression parameters are floored, not rounded to the closest integers
tracked
nekobako
When the default value for the int expression parameter has a decimal point, the value displayed in the Inspector and the actual value in VRChat are both floored, not rounded to the closest integer.
This behavior is different from when trying to set such values from expression menus.
It would be more consistent if the default values were rounded to the closest integers as well as the expression menu behavior. (and the mismatched parameter type conversion behavior: https://creators.vrchat.com/avatars/animator-parameters/#mismatched-parameter-type-conversion)
Reproduction steps
- Create an Expression Parameters asset and set it to the avatar
- Add Floatparameter with the default value of 0.9
- Change the type of the parameter to Int
- The input field shows 0, not 1 (it's still 0.9 in the Debug Inspector)
- Upload the avatar and wear it
- Avatar Debug Console says the value is 0, not 1
Tested SDK version
- VRChat SDK - Base 3.7.0
- VRChat SDK - Avatars 3.7.0
Log In
StormRel
tracked