macklebee Posted December 6, 2009 Share Posted December 6, 2009 Looking at the switch script and the files associated with the switch, I am trying to figure out how you are switching colors. It appears that you are just setting the color of the entity from no color to red, relying on the dark coloring of the rest of the switch to not show the entity has been set red? I see that you have two other mat files in the folder for ON and OFF. Was there a reason why the two material files weren't used to toggle back and forth between the on/off? Was there a noticeable lag or something as it swapped materials? Just curious, because I am trying to make a similar device that has an on/off like setting, and I am curious what the best method would be... but unlike the switch, the rest of my model will not be a dark color that could hide the SetColor results... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Josh Posted December 6, 2009 Share Posted December 6, 2009 If you change materials on one instance of the mesh, all instances of the mesh will be changed. The entity color is a unique value we can use to store information on a per-instance level. The switch has a special shader that uses the entity color value to display the different appearances of the switch. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.