Jump to content

Search the Community

Showing results for tags 'mouse_handle'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to UNIGINE Forums
    • News & Announcements
    • Getting started
  • Development
    • Content Creation
    • World Design
    • Rendering
    • Animation
    • Physics, Navigation and Path Finding
    • UI Systems
    • Sound & Video
    • Editor
    • C++ Programming
    • C# Programming
    • Networking
    • Sim IG (Image Generator)
    • VR Discussions
    • General
  • Improving UNIGINE
    • Documentation
    • Feedback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • Showcase
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 2 results

  1. Does anyone have any idea how I can properly have the mouse grabbed within the app without needing to click inside the window after changing the MouseHandle? I've followed this guide and I've been able to get the mouse to grab and everything works properly. The caveat is that the mouse is only grabbed after clicking inside of the window after changing the MouseHandle. I've tried to do it by directly setting App.MouseGrab to true and it has most of the behavior that I'm looking for. The mouse is grabbed immediately and works, but once I move the mouse to the edge of the screen, I'm no longer able to rotate the camera.
  2. Switch mouse state

    Hi, I am experimenting with UI. Using code below I try to switch the mouse state when i press F After reading these docs and looking in the sample i have not found a solution https://developer.unigine.com/en/docs/2.12/code/usage/mouse_customization/index?rlang=cpp https://developer.unigine.com/en/docs/2.12/start/programmer/user_inputs?rlang=cs https://developer.unigine.com/en/docs/2.12/start/programmer/ui?rlang=cpp The states only seem to work the first cycle. And i do not find what I am missing. private void Update() { if (Input.IsKeyDown(WidgedMode)) { switch (ControlsApp.MouseHandle) { case Input.MOUSE_HANDLE.GRAB: Input.MouseHandle = Input.MOUSE_HANDLE.SOFT; //ControlsApp.MouseHandle = Input.MOUSE_HANDLE.SOFT; Log.Message($"MOUSE_HANDLE.GRAB -> SOFT\n"); break; case Input.MOUSE_HANDLE.SOFT: Input.MouseHandle = Input.MOUSE_HANDLE.USER; //ControlsApp.MouseHandle = Input.MOUSE_HANDLE.USER; Log.Message($"MOUSE_HANDLE.SOFT -> USER\n"); break; case Input.MOUSE_HANDLE.USER: Input.MouseHandle = Input.MOUSE_HANDLE.GRAB; //ControlsApp.MouseHandle = Input.MOUSE_HANDLE.GRAB; Log.Message($"MOUSE_HANDLE.USER -> GRAB\n"); break; default: break; } } } Admitting i do not understand this sample in the docs /// Method toggling the mouse cursor's state public void ToggleMouseCursor() { // getting current mouse state bool enabled = controls_app.MouseEnabled; // toggling movement restriction to the application window area App.SetMouseGrab(enabled ? 0 : 1); // toggling mouse interaction with GUI elements gui.MouseEnabled = enabled; // toggling mouse control controls_app.MouseEnabled = !enabled; } Unigine v2.12.0.2 Thanks for the help
  • Create New...