Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Help!!!

Discussion in 'Scripting' started by ZBlade, Sep 16, 2012.

  1. ZBlade

    ZBlade

    Joined:
    Sep 15, 2012
    Posts:
    53
    I need a code for my main menu, when i hover over a 3d text which has a box collider in it
    a sound will play
    Please Reply
     
  2. ShadoX

    ShadoX

    Joined:
    Aug 25, 2010
    Posts:
    260
    Well, in that case you should look up collision and playing sound.. even if I'm not sure if using a boxCollider would be the best way to do this. (also, getting the cursor position in 3d space.. I guess)

    So...
    mouse cursor
    playing sound
     
  3. ZBlade

    ZBlade

    Joined:
    Sep 15, 2012
    Posts:
    53
    Well, as i'm only a beginner :p
    Anyway I used box collider on a 3d text and made a code where it changes to a colour when you Mouseover