This question already has an answer here:

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.


marked as duplicate by David Feb 3 at 14:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\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 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.

enter image description here

Example file:

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.

enter image description here

Example file:

  • $\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 at 0:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.