vrchat-community / osc

Files and Info on using OSC to communicate with VRChat
MIT License
234 stars 5 forks source link

Floats are not clamped within the defined range #23

Open NarryG opened 2 years ago

NarryG commented 2 years ago

Describe the bug Using OSC, you can push the value of a float past 1.0 or below -1.0, the defined limit normally allowed by VRChat float parameters. After swapping off and back to the avatar, the value is clamped back down within range.

While being able to bypass the standard range has its potential benefits, this behavior appears to be unintentional and conflicts with other systems expecting that defined limits.

To Reproduce Steps to reproduce the behavior:

  1. Send an OSC message with a float value above 1.0 or below -1.0
  2. Open the parameter debug menu
  3. See parameter outside of defined range

Expected behavior Float parameters are clamped within the defined range of -1.0-1.0

Screenshots image image

Info (please complete the following information):

Additional context
When you set a float to MaxValue, other fun math errors occur. image image

Greendayle commented 2 years ago

NaNs also can break animators.

EIA485 commented 1 year ago

while this may be a bug, till #2 is implemented this should not be fixed, some users are using un clamped range of the float to have local only functionality.