Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClientSim calls mouse input events in a different order than VRChat #71

Open
iffn opened this issue Mar 10, 2023 · 0 comments
Open

ClientSim calls mouse input events in a different order than VRChat #71

iffn opened this issue Mar 10, 2023 · 0 comments

Comments

@iffn
Copy link

iffn commented Mar 10, 2023

Pressing the Left mouse button in Desktop mode calls both the InputGrab and InputUse function. However, the order differs between VRChat and the current version of ClientSim.

Test code:

public class InputTester : UdonSharpBehaviour
{
    int counter = 0;

    public override void InputGrab(bool value, UdonInputEventArgs args)
    {
        Debug.Log($"{nameof(InputGrab)} called {value} at {Time.time} with counter {counter++}");
    }

    public override void InputUse(bool value, UdonInputEventArgs args)
    {
        Debug.Log($"{nameof(InputUse)} called {value} at {Time.time} with counter {counter++}");
    }

    public override void InputDrop(bool value, UdonInputEventArgs args)
    {
        Debug.Log($"{nameof(InputDrop)} called {value} at {Time.time} with counter {counter++}");
    }
}

Result in ClientSim:

InputGrab is called before InputUse
ClientSimTest

Result in VRChat:

InputUse is called before InputGrab
image

Note: Double call of InputUse in VRChat is a known bug:
https://vrchat.canny.io/vrchat-udon-closed-alpha-bugs/p/1275-inputuse-is-called-twice-per-mouse-click

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant