|
Hi I am new to Unity3D and don't know how to solve this problem. I am making a product demo and where you can rotate the product and explain what different parts do. On one side of the screen will be a vertical list of parts e.g. 1.Nut 2.Washer 3.Case 4.Switch etc. 5... In the center of screen will be the product which can be rotated in 3D. At the Bottom of screen will be a text filed explaining what each part does. What I need help to do is make the Parts list interactive. That is to say when I put the cursor over the name of each part i.e. 1.Nut the text changes color (highlights) at the same time the 3D part (mesh) changes color and also text explaining the function of the part appears at the bottom of the screen. The camera and 3D model are not a problem I just need make interactive parts list work. If anybody can help I would really appreciate it. I am using Java script. Thanks
(comments are locked)
|
|
First, make sure that you add a collider component to each part which you want to be an active rollover. Next, add a GUI Texture GameObject to your scene (from the GameObject menu). Rename it to "Rollover Text Display" (exactly, case sensitive). Now create a new Javascript script, name it "RolloverItem", and paste this in:
Finally, add this script to each object that should have rollover text. If you don't specify some text in the "Rollover Text" field for each item, the object's name will be displayed. You can so adjust the rollover colour. Thanks for your help that script put text on screen when the mouse rolls over a 3D object which is very useful to know, but not 100% what I am looking for. To help explain what I need here is quick 2D mock-up in flash. http://www.siamation.com/FunctionTest.html I would like to do something like this in 3D. Notice only the parts list on the left is interactive, that's because some parts are hidden by other parts so impossible make roll overs. But they to change color and text explaining what they do appears on the bottom of the screen. Thanks
May 09 '10 at 10:24 AM
Surfer
OK i got it partly working using a GUItexture but had to remove this line of code originalColor = renderer.material.color; Now all I have to do is some how reference the object to change its material color.
May 09 '10 at 02:57 PM
Surfer
(comments are locked)
|
