Jump to content

Search the Community

Showing results for tags 'input'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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
    • Add-on Store (https://store.unigine.com/)
    • Showcase
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 5 results

  1. Hide Mouse Cursor

    Hi, I’m looking to control when the cursor graphic is displayed on screen so I can toggle between showing mouse cursor for UI interaction and hiding the mouse cursor for controlling the player camera via custom controls. Currently I and using the define MOUSE_USER and have the two functions below in an input manger class to enable mouse control which should hide the mouse cursor but still allow getting mouse delta x and y values for custom control handling while the cursor is hidden and disable mouse which should show the cursor disabling my custom input and allow the user to interact with UI: public void EnableMouse() { if(!MouseEnabled) { App.get().setMouseGrab(1); App.get().setMouseShow(0); //controls.grab(); //ControlsApp.get().setMouseEnabled(0); MouseEnabled = true; } } public void DisableMouse() { if (MouseEnabled) { App.get().setMouseGrab(0); App.get().setMouseShow(1); //ControlsApp.get().setMouseEnabled(1); //controls.release(); MouseEnabled = false; } } Currently when I call App.get.setMouseShow(0) the default windows cursor is hidden but replaced by the cursor graphic below: How can I achieve the desired results? Mouse Enable should: · Hide all cursor graphics · Allow a method of retrieving either mouse delta x and y or mouse position x and y within the my custom input manager class · Disable interaction with Unigine UI Mouse Disable should: · Show default windows cursor allowing interaction with Uninge UI
  2. GamePad / Input System

    Hi, I’ve setup a project to use the Xbox controller for player controls. I’ve done this using the ControlsXPad360 class to get the controller input and the set the control states for the player based on the game pad input like so: int leftThumbstickX = (int)gamepad.getLeftX(); if (gamepad.getLeftX() > 0.25) leftThumbstickX = 1; else if (gamepad.getLeftX() < -0.25) leftThumbstickX = -1; else leftThumbstickX = 0; if (App.get().getKeyState(ControlsApp.get().getStateKey(Controls.STATE_MOVE_RIGHT)) == 0 && leftThumbstickX >= 0.1f) { controlsRef.setState(Controls.STATE_MOVE_RIGHT, leftThumbstickX); } The problem with this is setState only takes an int so you lose the analogue values and fine movement controls for the player. I’ve started to look at the following information in the documentation: https://developer.unigine.com/en/docs/2.7.1/code/uniginescript/scripts/input Is this the correct way to use the gamepad with a player? I’ve created a short xml to test this but in the Unigine script file that was created when I created the test project when I do Step 4 and add the code to load the xml controls: Control control = new Control(); control.loadFromFile("Input.xml"); and then run the project, the world no longer loads and I get the attached error, without this code it runs fine. Can you advise on the correct way to implement xbox controller controls for a player while maintaining the analogue input? Thanks, Marc.
  3. Hi, I am trying to use the Unigine input system (with SDK 2.0-beta2). I managed to display the Unigine::Input::ControlSetupWindow in my project and save keyboard and mouse inputs in the XML control file I created. My problem is, I failed saving joystick inputs. I have an XBox 360 gamepad which is correctly recognized : I made a debug widget which displays the status of the pad to make sure of that. I have been diging in the scripts\input folder to try to understand the problem : I saw that the inputs of the pad are correctly registered in the device manager, but it seems their status is not updated there and I don't understand why. I guess I am missing something and I would appreciate any help. Another little question : when I click on my status widget (or anywhere outside the game area), the pad becomes "unavailable". Is there a way to fix that ? Thanks !
  4. Console input issue

    After running unigine-based application on ubuntu 11.10 via optirun (maybe this tool for switching video adapters is the reason!), gnome terminal showing no input. Actually input is working properly, but it becomes invisible. When i run other applications via optirun from linux console after it closes input works well.
  5. In the docs, the camera referred to as third-person. How do we spawn/initialize FPS cam in Unigine and control it? How do we set collisions for it and a make it sway as in typical FPS game? Thank you. EDIT: http://i.imgur.com/MCnbA.jpg << I need to achieve #3. This way I have shadows cast by the player's model, I see player in the reflection, for I only see vweap model (arms and guns) in the view. That's how pretty much most FPS games work.
×
×
  • Create New...