I have many pawns and characters that a player can in habit. Characters, cars, drones, camera’s, etc. Each of these will be active in the world, and many of them will reuse the same Gamepad controls. Lets say Left Shoulder as an example. Further, UI’s in the foreground can also accept the use of various gamepad events for navigating the UI.
What types of approaches are more scalable for this? My game will possibly have 1-2 dozen pawns\characters that the player can inhabit. What I have just developed is an array on game mode, and an ‘active’. Each time a fresh possess occurs the ‘active’ is updated, HUD changed, etc. This is already working so seemed like the logical place to add the new approach.
What I just added was a check like ‘Am I current?"’ as a filter on every single event and if the character\pawn is not current the event is discarded.
I just thought… if I handle this centrally, then the central code will need to know what event the subclasses will even want which means a event registration system. This seems like the kind of that that should be built in… so… In your opinion what’s the best way to only send the axis\events through to the right pawn?