Can anyone point me in the right direction? I have a ‘wall’ in a game with a box collision that I want to take different actions based on what hits the wall. If the other actor is an enemy I want one thing to happen, if the actor is an ally I want something else to happen. Is there any kind of a ‘switch’ or ‘case’ that I can use based on the class that collides? Or do I have to do something like the screenshot below where I cast to one thing, then if that fails, cast to the next, and so on until I get the actor / behavior that I want?
Thank you for taking the time to read this.