Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Jul 25, 2015 at 06:08 PM by getyour411 for the following reason:

Too subjective and argumentative

avatar image
1
Question by FrontBackItaly · Jul 25, 2015 at 03:53 PM · guiinputfpseventsystem

World space GUI interaction with just a crosshair and a keyboard

Hi everybody, I'm currently making an FPS, but I ran into a problem. For my game, I need to use some interactable world space GUIs with only static elements like labels and images, and some buttons, so nothing complicated.

The issue is that to make the player interact with the GUI, I need to unhide and unblock the mouse from the center of the screen, which frankly is an awful way of interaction.

Since my FPS features a crosshair, made with an image centered on the screen using an overlay canvas, I was thinking about making the player interact with the GUI by simply aiming to the required button and pressing an interact button on the user's keyboard. The problem is that I actually don't know how to achieve this. Googling around, I read about a trick that consisted in locking the mouse to the center, and then using the left mouse click to interact with the GUI, but I sincerely don't like this option, I think that the users would feel confused by the two functions of the same key (interact and shoot), so I'd prefer to make two different keys, so I can use the same interact key both for the GUI and the interaction with other world objects.

Another trick I read was to write a custom input module to make the Graphics Raycaster trigger when a certain key is pressed, but I have the feeling it would be just time consuming and it would make more troubles than benefits.

So, what would be the best way to make a world GUI interactable with only a crosshair and a key press?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image getyour411 · Jul 25, 2015 at 06:08 PM 0
Share

"Best way" questions should rarely make it through moderation I$$anonymous$$HO; the 'final answer', if one is chosen, is highly subjective and might be best for your situation but not others. Please take general design/open-ended questions to the forum.

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

GraphicRaycaster UI event issue with Unity v5.2.0bx 1 Answer

Send UI Button Event with key press NOT onClick()??? 2 Answers

Changing the Standalone Input Manager variables 2 Answers

Gui list and color 0 Answers

Android Textfield locks out input until esc 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges