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 Durante · Mar 18, 2012 at 09:10 PM · javascript3dmenumouseover

mouse over for 3d menu

How can I make it to where when my mouse goes over a button for my 3d menu the button pops out and when the mouse is off it the button goes back in and upon clicking on it it does the application.loadlevel ordeal this is the code i have and i kno it works with buttons but i want to use the mouse please help me. Thank You

 function Update () 
 {
 if(Input.GetButtonDown("Fire1"))
 {
     iTween.MoveTo(gameObject,{"z":-1, "time":1});
 }
 else if(Input.GetButtonUp("Fire1"))
 {
     iTween.MoveTo(gameObject,{"z":0, "time":1});
 }
  }

that is my code im using right now and that works but i have more than one button and again i want to use the mouse any help or direction is greatly appriciated.

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
1

Answer by Berenger · Mar 18, 2012 at 09:15 PM

You need a script with OnMouseEnter and OnMouseExit function on those objects, with a Collider.

Comment
Add comment · Show 2 · 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 Durante · Mar 18, 2012 at 09:22 PM 0
Share

ok well i would have put a comment but there is no button where it used to be to add a comment so i have to put it here....anyway ok with the On$$anonymous$$ouseEnter and On$$anonymous$$ouseExit where is the collider used is it used one per button or a big collider to cover all the buttons ive never used that function call before so im completely new to it please a lil bit more of a hint if you can thank you.

avatar image Durante · Mar 18, 2012 at 09:36 PM 0
Share

I figured it out thank you very much $$anonymous$$antoue.

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

3D Menu Help 1 Answer

Use yield WaitForSeconds to delay mouseover on a gameObject? (JS) 1 Answer

how to set a texture and another font in a GUI Text 2 Answers

How do I make music continue through certain scenes 1 Answer

Enemy doesn't face player 0 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