Using Actor position to change the colour of a decal

Hi all, I use this node (the fractional part off the end) to add variations of colour to meshes that all instance a single material, so I don’t need millions of mat instances. However when I wanted to use it with decals it doesn’t work - which made me kinda sad…Is that a bug or a feature or what? They all just came out black whereas the same shader on meshes had different colours.

Can any inventive people come up with another way to do it?

cheers! - Aten

Can you post a screenshot of your current material setup please?

Hey Aten -

Make sure that your decals are rotated correctly I usually have to rotate the Y 90 degs when placing decals into the world. But Jacky’s right upload your material setup so we can look at how you have the behavior setup.

Thank You

Eric Ketchum

Hi Aten,

Try using Object Position instead of Actor Position to set your color.

Thank you.

Eric Ketchum

Sorry guys I’ve been off for a few days but here’s the setup, just the bit i use to do the colour.

http://postimg.org/image/s834a9nqf/314d34ab/

Note that this setup works ok on objects when i drag it onto them in the scene - but just not on decals (also the decals are already placed in the world so I can see them all and they are all black…

cheers!

Yeah I did try that one also Eric, it doesn’t appear to work with decals - I get this error…

Error [SM5] error X3004: undeclared identifier ‘GetObjectWorldPosition’

Hey Aten -

I have submitted a request to see if we can add this feature into the mateiral editor. Decals are tricky as they do not have a object position like meshs and other actors.

Thank You

Eric Ketchum

Cheers Eric would be good to have in there if you can :slight_smile:

Thanks - Aten