Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 /
avatar image
0
Question by Arcturis · May 20, 2015 at 05:18 AM · uiguiunity5menucontextmenu

Positioning Context Sensitive Popup Menu Using 4.6/5 UI system

I am working on a top down 3D 3rd person game with point and click elements in Unity 5. I am trying to figure out the best way to do a context sensitive radial/pie menu that will appear where the user right clicks in the scene (sort of the way the Sims series works or old school point and click adventures). I'm wondering if someone has done a similar control and if they followed one of the two paths below or a third option?

My first thought was to set a panel in World Space mode which would contain the buttons and then parent/bind that to an empty game object which could be moved to where the user clicked , this would allow the menu to stay affixed to the item the user clicked on, in case they pan the camera after bringing up the menu. The problem here is that trying to find a uniform distance from the object to avoid clipping issues or being obscured by other objects and avoiding the menu being drastically larger or smaller because it is closer/further from the camera due to the object distance or camera zoom. (I am currently using Perspective mode, and would prefer to not move to Isometric)

My second thought was to use the Screen Space overlay mode and reposition the panel on the canvas using ray tracing to determine the correct position over the object in the game world but then if you pan the camera after clicking the menu would stay wherever it was on the screen without working some magic that is beyond my current skill level.

I've searched several times for tutorials on this type of situation but I haven't found anything that uses the UI system introduced in 4.6 ( I am currently using Unity 5)

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Arcturis · Jun 01, 2015 at 11:38 PM

If anyone else comes across this I have chosen the second method and moved forward, time will tell if it is the correct choice.

Comment
Add comment · Share
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

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

image moved is leaving a trail 2 Answers

gameobject references runtime script in scene file 15 Answers

4.6 UI transfer between Menu pages 2 Answers

UI is not visible on Android lollipop after upgrading from 4.6 to 5. 0 Answers

How do I keep an ui element in side of the canvas when scaling? 1 Answer


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