Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 qinghill · Nov 24, 2011 at 09:35 PM · guitouchscreen

How to do this GUI

Hello Geniuses out here!

I'm new with unity but kind a in hurry to learn so i can pitch on a big job! Im pushing my luck here, If some one can suggest a script for a GUI which do something like this : http://vimeo.com/32607585

(i animate that for reference)

and its gonna be touch input in windows 7 output to 30" LCD TV with NExtWindows Touchscreen Overlay.

Comment
Add comment · Show 2
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 CHPedersen · Nov 25, 2011 at 08:26 AM 0
Share

Cool GUI. :) I have to wonder what you mean by "suggest a script", though... If you mean "write me a script that does that", it's no good. That's the fastest way to earn people's ire around here. If you mean "offer suggestions on how I can implement this myself", then you've come to the right place. :)

First of all, the selectable elements look like thin boxes to me. So make thin boxes, and either try to play with how to create a texture that wraps around it in such a manner that the sides turn blue and the front displays the desired content, OR maybe create a plane the same size as the front of the box, make a child of the box so it shares the box's rotations, and then texture the plane with the content ins$$anonymous$$d. That would probably be easier.

Then, study the various rotations available in the Quaternion and Transform class. There are tons of them, many of them useful to your scenario. What you want to do isn't particularly mathematically difficult: You just want to rotate a collection of your boxes an equal amount of degrees around a shared axis, probably Vector3.up. Transform.RotateAround (http://unity3d.com/support/documentation/ScriptReference/Transform.RotateAround.html) does that, for example.

When you've got that working, you can start looking into raycasting to get them actually selectable, but that should probably be in a separate question...

Again, sorry to disappoint you if you were hoping for a finished solution.

avatar image qinghill · Nov 25, 2011 at 09:42 AM 0
Share

thanks.. CHPedersen.. thats what i meant.. someone to point a direction so i can do it my self..

right now what i did is, model all things in c4d, bake and import it. $$anonymous$$ake 1 parent and put all the blueboxes in that parent. make that parent rigid body and put drag rigid body in it. yes it's rotated when i drag it :)

so i guess i have to look into ray casting isnt it?

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by qinghill · Nov 25, 2011 at 09:03 AM

I manage to rotate that ring, but how do i click each of the buttons inside that rigidbody? urmmmmmmm

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
avatar image
0

Answer by ks13 · Nov 25, 2011 at 09:18 AM

Try Physics.Raycast and RaycastHit...coupled with Input.touches, should be what you're looking for.

Comment
Add comment · Show 3 · 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
avatar image qinghill · Nov 25, 2011 at 09:42 AM 0
Share

will try thanks

avatar image qinghill · Nov 28, 2011 at 03:22 AM 0
Share

i dont get it

avatar image ks13 · Nov 29, 2011 at 08:34 AM 0
Share

Ok. You use Raycast to trace a ray from a touch or all the touches towards the back. If the ray touches an object, Raycasthit returns which object is hit. You get the name of the object or any other parameter that helps you identify the choice made by user. Then you act upon the choice.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Setting Scroll View Width GUILayout 1 Answer

Destroy a Game object on collision and add it to my Gui??? 1 Answer

PasswordField help. 1 Answer

Two Unity GUI questions 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