How do I get the RGB value of a mesh at runtime?
I've got a static mesh which is using a dynamic material instance and timeline to change the colour. Depending on what the colour is when the player hits it will change what the mesh will do.
For the sake of simplicity, I'm only using blueprints and pure red and blue colours.
To make this work, I need to know what the RGB value of the mesh is when the player hits the collision mesh.
How would I go about finding this out at runtime?
asked May 04 '19 at 02:04 PM in Rendering
The most simple way would be to query the timeline rather than the mesh itself. As your timeline updates, update a Vector variable too with the RGB value and when the mesh is hit, just check the value of that vector.
Personally I'd add all this within an Actor Component as it'll be easy to reuse across many actors.
answered May 04 '19 at 03:19 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here