Architectural Interior Material interaction Swatches

Hi everyone!would anyone know how to allow the user in game to change materials of a wall. What i plan on doing is allowing the user to hover over a wall, the wall then turns lighter or darker to show it is highlighted and once the wall is clicked a pallet of materials show up in boxes that the user can click on which will then change the material of the wall.

Here is a video on youtube that i found. It is similar to what i want to achieve. look from 2:12 to 2:30

If anyone can help me i would be soooooooooo appreciative
Thanks in advance!!!

I didn´t test it. But “Set Material” in the Level Blueprint should do the job.
Replace the 1-key with a trigger box or what ever you want.

ChangeMaterial.PNG

Thanks for the reply, i have done a similar script to that but that script doesnt do what im looking for. I am trying to get a pallet of materials to show up once a wall is clicked on.

I created a quick and dirty version of that kind of functionality in the puzzle template. Here’s a video of how it works.

This is the blueprint of the mesh you want to change the material of:


This is the HUD Blueprint the box gets drawn on:

I made one bool variable to toggle the texture picker in the HUD blueprint and a reference to the HUD in the object blueprint.
It does require all the objects you want to modify to be actual actors with that bit of scripting in it and won’t just work on any random static mesh you have. Or you’d have to add click events for the meshes in the level blueprint.

Edit: And there’s an example in the content examples under mouse interaction that shows you how to change the material (highlight it) when you move your mouse cursor over them.

Great work. I wanted to do something similar but with a 3 vector parameter control for the colour value. Not sure if it’s possible but would be awesome if you could figure it out :slight_smile: