- Home /
Change GameObject's ambient/brightness
Hey it's me again :)
I simply want to change a GameObject's ambient/brightness, when I hover it (void OnMouseOver() {}). Is there a simple way? In 3d GameStudio you can use the method entity.ambient ...
Greets, kack93
Answer by Berenger · Jan 12, 2012 at 03:17 PM
You need a specific shader with an ambient value, meaning an additive value at the end of the fragment shader. You can take the shader currently used by the objects in question, and edit it a bit. Then in your code : material.SetColor( name, value );
Please accept Berenger's answer, by clicking the check, so he can get credit for his awesomeness... ;)
Your answer
Follow this Question
Related Questions
Building asset bundles and wanting to move game objects from one parent to a newly created parent 1 Answer
How to change material of gameobject using C# to a material asset. 2 Answers
Changing or replace objects 2 Answers
Any way to change transform.position of an indefinite number of gameobjects on FixedUpdate? 2 Answers
C# Change Script Help 1 Answer