Hi! I’d like to know if the idea of using actor components and give them functionality is useful or not.
I mean:
Imagine you have an actor like a player, the idea is to add, for example, an actor component called playerMovility that gets all the movement logic. So tha player just needs to connect to the movement component. We are thinking about using this to avoid replicating code, so, whenever you want you can add that component to an actor, a parent actor.
Thank you so much!
Yes. That’s how pawns already work in UE4. You can grant them a movement component (or more) that handles some logic. Does not need to be movement, of course. All sorts of logic.
I’ve got a bunch of AI components some actors have that hook up to movement components that some actors have. Mix and match.
We are thinking about using this to avoid replicating code
Especially useful considering the fact that those components can be added / removed run-time, too. It’s a versatile approach but it does add to the complexity.
Thank you so much! We’ll give it a try