I have a WheeledVehicle Blueprint in which i want to change the materials at runtime. However since its a [ROOT] mesh i cant seem to find a way to change materials at runtime. There is a Mesh Variable inside Vehicle group but i cant use it. When compiling it says Pin Target must have a connection and the target only accepts Character.
I also tried setting the Mesh to None in [ROOT] and added a new SkeletalMeshComponent and tried using it. But then the vehicle wont move.
So is there anyway to change materials at runtime for a WheeledVehicle?
Thanks for your report! Would you be able to post a screenshot of your setup for how you’re trying to change materials?
Sure thing Steve! Its a very very simple setup like this. I dragged and dropped Mesh node from My Blueprint and compiled:
As you can see the Target for the Mesh node is expecting a character and since the vehicle is extended from Pawn am not sure what to do.
It looks like there is an issue with correctly referencing the SkeletalMeshComponent in the WheeledVehicle blueprint class, so I have filed a defect to investigate and fix. If we find a work-around in the meantime, I will update you with that information.