Okay, so logically it seems what I’m doing should work, but it does not, and it gives me a bunch of errors saying that I tried to access a null object when I perform the following action.
Any ideas what I’m doing wrong?
Okay, so logically it seems what I’m doing should work, but it does not, and it gives me a bunch of errors saying that I tried to access a null object when I perform the following action.
Any ideas what I’m doing wrong?
Get Base Material. Hook it up into Create Dynamic Material - Source Material.
Dumb of me to miss that but unfortunately the issue persists. Here is a screenshot of the error log.
Oh I see thats not a Overlap event you got ther on the left correct? Its a linetrace or something. Make sure you actually hit something first before you access the data. (If you hit nothing you cant pull data out of nowhere right ;P)
that’s what I don’t understand since in my current game state the line trace should in fact hit something at any point, and even then it doesn’t change the colors when it’s obvious I am hitting something. In my game the player is in a room of blocks of the same type, so their must be something fundamentally wrong with what I’m doing.
And just to add to that, I am using line trace succesfully for several other actions.
So what I ended up doing was presumptively casting from hit actor to the type of actor I wanted to change the color on dynamically. I really didn’t want to just swap materials as that can get tiresome quickly for lots of colors.
This method works for my project but I’m sure there must be a more effective method to change colors of any actor without presumptive casting.