playMaker

Author Topic: Altering Material elements in Mesh renderer at run time. (please help)[SOLVED]  (Read 1459 times)

le_bonn

  • Playmaker Newbie
  • *
  • Posts: 17
Hi Everyone,

Hope someone can give me a little bit of assistance here, I have been trying to work this out for a while now.

So the scenario is this, I have multiple objects in my scene which when touched by the user change their material.  This is all fine when there is only one material to set on the object, but on many I need to assign a set material to a particular element within the mesh renderer. (these seem to align to the UV groups I created in blender??)  Unfortunately, I can't work out a way to do this with playmaker. I though Set Property would be fine, but it doesn't seem to allow me to access these properties. Am I being silly and missing something?

Any help would be gratefully received.

Cheers

le_bonn   :)



« Last Edit: June 26, 2018, 07:23:49 PM by djaydino »

verybinary

  • Junior Playmaker
  • **
  • Posts: 81
    • The Museum of Digital
there is an action called something like set object material(probably on ecosystem). you should be able to use this with a system that tells itself what it should be switching to.

le_bonn

  • Playmaker Newbie
  • *
  • Posts: 17
Hi there,

Thanks for the reply.  I have worked it out using the standard set material action, and as I guessed I was missing something very simple. 

I have included the explanation/method, if anyone is a silly as me in the future. 

The material index option, within the set material action aligns to the elements in the mesh rendered, so by referencing the number that is relevant to the area you wish to change the material of you can control separate areas of the same object, in my case by using more than one set material action to repaint the desired areas at run time.

Cheers

Liam