What I have right now is an actor class BP with custom events “LookedAt” and “NotLookedAt”, which trigger in response to traces from the player camera. When the camera is pointed at an instance of the actor, it responds, right now by changing color. It changes back when the camera looks away.
What I’d like is to do is use the actor as a parent for others which I would like to respond to the “LookedAt” and “NotLookedAt” events, but not necessarily in the same way. I’ve been able to change the materials used by the existing logic by exposing them as variables and setting different defaults in the child class, but what if I want different BP functions to run from it? I suppose I can set up variables that indicate the behaviour of each child class, give each one an identifying value in their defaults and set all the logic in the parent class, but that seems messy. Attempting to set up the LookedAt/NotLookedAt custom events in the child’s event graph just seems to break the existing function, so neither the original material-changing logic nor the new function seem to fire.
Will I have to go back and run the material-changer from event tick and use a variable to determine the correct state? So the LookedAt event will set a variable to true, and the tick event will run a function to set the material based on that? Should I be concerned about overheads if I’m doing this will lots of these objects at once? Seems like it shouldn’t need to be that way…