vrchat-community / osc

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

Bool messages do not work as intended #41

Closed Curtis-VL closed 2 years ago

Curtis-VL commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

Expected behavior In-app, this should result in true or false being applied to the parameter.

Info (please complete the following information):

Additional context VRChat is expecting a 1 or 0 int instead of a 'true tag bytes' or 'false tag bytes' found in OscClient.cs. When sending a bool, OscClient simply writes the tag as true or false, it doesn't write anything afterwards.

True tag bytes is a uint of: 21548 False tag bytes is a uint of: 17964

momo-the-monster commented 2 years ago

Fixed in next release! Had to fix an issue in the underlying OscCore library - new version is 1.1.2, also made a PR to the upstream repo.

FYI you can patch this yourself in the meantime by specifying the input for a Boolean parameter to be of type 'Int' or 'Float' like this:

{
    "name" : "Toggle",
    "input" : {
        "address" : "/avatar/parameters/Toggle",
        "type" : "Int"
    },
    "output" : {
        "address" : "/avatar/parameters/Toggle",
        "type" : "Bool"
    }
}