I want my games that have function that can changes the character colors.I have try this a few times.I can make it changes colors in the menu but the colors doesnt change when I click start button. Can any body help me please.
-
$\begingroup$ what does your game do "when I click start button" Sounds like you are probably changing scenes, and you did not change the color of the car in that scene. $\endgroup$ – David Feb 3 '19 at 14:24
There's two ways to change object colors in real time: through Object Color material's option, or through material node's Hue/Saturation (available in realtime only in UPBGE).
Object Color
This one is pretty simple:
- Enable the Object Color checkbox on the desired material.
- Change the Object Color in realtime by animating it.
Hue/Saturation Node
This one is a bit more complex, but a lot more powerful and with better results. Remember this one ONLY is possible in realtime on UPBGE.
- Go to Node Editor and enable the node compositing for the desired material.
- Add an Hue/Saturation node between the Material node and the Output node.
- Separate the RGB colors of the object and set the hue value to the red value.
- Animate the red color on Object Color to change the hue in realtime.
-
$\begingroup$ It works but only at the menu.After I change the color,when I click start button,It still the same $\endgroup$ – mr car Feb 3 '19 at 0:15