Change Material of a mesh with mouse click event in runtime with blueprint
Hi guys, I need to do something very specific and I don't know how, so if you be so kind to help me, i will be very grateful. I need a blueprint to assign to several actors (meshes) a property to change material with a mouse click over it. For example a Wood Wall change to a Concrete wall doing click over the mesh. The second that I need for the same meshes is show a specific text in HUD when the mouse pass over the specific mesh, with "mouseover" property. At the same time, when the cursor (crosshair) is passing over the mesh, change the drawing of the crosshair for something like "finger" or "clickable". The meshes are six in total.
Thank you again, and I hope you can help me
asked Mar 09 '15 at 11:28 PM in Blueprint Scripting
Well finaly i did this to make the material change. I post it if someone need to know how to do it. Is very simple.
answered Aug 12 '17 at 04:34 PM
this should give you a great starting point
I created a variable click Id that will loop from 0 to 2. [0,1,2,0,1,2,0, etc], then I set a material on the current static mesh to the associated material created in the array.
Just be sure to set the correct material in your default variables
answered Mar 09 '15 at 11:45 PM
Thank you MarcAndreG, i will check and try to make it. Did you do it on Character Blueprint or in a new BluePrint? If I have some new question i will ask you again :)
answered Mar 09 '15 at 11:55 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here