Note: Required for couch co-op unless you want all players clicking at the same time. Had to hack something together so dragging would work with a locked cursor, as well.I did this since I was actually making a single-player project and wanted to be able to toggle lock the reticle in the center. I ripped out the "Cursor.lockState = CursorLockMode.Locked" bool checks in ProcessMove and ProcessDrag so that I could use these properly with cursor in a locked state.His script didn't allow for dragging UI sliders and such, I fixed that for my use.Warning: My script is much longer than 's since I added some other features(listed below) and also left in some inactive debug checks, etc. I was really only trying to set up a reticle cursor that worked with World Space UIs, but kept going with it. Ironically, I wasn't even doing anything multiplayer related, but I got to tinkering and just kept messing with stuff. I found this thread an incredibly useful starting point, despite its age, so I figure I'll chip in and share my own learning experiments with this. Then my question is, how should I proceed to implement step 3? What do I really need to implement and what is already ready to use in Unit圓D? Thanks for the attention =3.3- Send these data to Unity's UI Event System to simulate mouse or touch interactionĤ- Attach the script from step 3 to the hand =3.2- Be able to get keyboard inputs as mouse clicks =3.1- Be able to convert 3D-space coords to UI canvas coords So in my head I think that I have to follow the following steps:Ģ- Create a script to control the cursor's movement like a common player moved by keyboardģ- Create a script to handle a game object like a mouse cursor Raycasting to create interaction between itens and inventory slots: There are a lot of material talking about it but it seems to be too abstract, at least for me, none of them show the custom input system being integrated with the Scene's game Objects. So I did a search on Google and found a lot of material and then. Each cursor should interact with the UI like the mouse cursor and being compatible with the UI's event manager events. Hello here guys I want to create a cursor that is controlled by keyboard or a joystick, not by the mouse, like that hand-cursor used in Super Smash Bros character menu.Īlso if possible I want to get more than one cursor in the screen, like 3 players 3 hand-cursors for each player and it goes on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |