Announcement

Collapse
No announcement yet.

how to get a material to change to a specific color using booleans?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to get a material to change to a specific color using booleans?

    I am trying to use a boolean to get my object to change from blue to red and when hit again it changes to orange.

    #2
    Use an integer instead, Start at 0, when hit add 1.

    After you change and store the int, use it with a 'Switch On Integer' to set the new material of your actor.

    Comment


      #3
      If you do not want to create (and maintain) multiple materials, try a Dynamic Material Instance. In your material, Convert the colour (RMB on the node) to Parameter and give it a name. You will be able to change its value during runtime.

      This is how you access it in your object:
      Click image for larger version

Name:	Untitled.png
Views:	1
Size:	262.1 KB
ID:	1114308

      The bool can be omitted altogether, of course.

      Also, more info here:
      https://docs.unrealengine.com/latest...rialInstances/

      Comment

      Working...
      X