I’ve worked on Unreal the last couple of years, but mostly doing env stuff and Blueprints things related to materials, which is my main area of work. For the first time i have to do which is for me my biggest Blueprint challenge so far. I usually handle this to other developer but there is no chance for that this time.
I need to create an Arch Viz where you can change the materials of the static meshes in it. The env is ready and gorgeous, but the blueprint thing is not working for me. I can change material based on button pressing and triggers, but that’s not what is needed. What is needed is for the player, a first person character, to be able to change the material when is pointing at it:
The player walks through the room.
The player sees at something.
If that something has the capacity to change material, then the player can press LMB to cycle through them (an N number of them, no more than 6 by this point)
(Ideally it should be an interface, but baby steps).
As i said, right now what i have is the ability to change materials by pressing buttons: i created a Blueprint which contains the static mesh in question and then assign to them a button to change its materials. For the most part it works as intended (initially it was on the level blueprint, but then a learned how bad idea that was, so i created a Blueprint for it, please, make a suggestion if you have one). I have another working blueprint which does the same thing, but the player has to be on a trigger, there are actually various tutorials that target this on Youtube, but none of them are using ray casting. I guess that’s how far i can reach for my knowledge.
For the actual solution we are looking for I created another Blueprint that cast a ray as seen below, but it doesnt work, it’s not detecting the static mesh intended but the others in the level. When i do this very same thing in the level blueprint it actually works.
My request is: please, could someone create a general plan to accomplish this, maybe on bullet points from, a blueprint for the blueprint if you will. Pointing at examples (i guess i have seen everything by this point but it doesnt matter), part of the documentation or whatever.
Any advice is helpful.