Character class overhead

in our first implementation of the game, we went too far down the rabbit hole and implemented all the classes based on the actor class with a lot of custom functionalities built around it.

Later we found out a lot more features we could benefit from if some of the enemy classes were driven from the character class.

The question is, is there any cost penalty if we drive all of our classes from the character class tough only a handful would use the features and this way we could keep the shared functionality ? Is there any overhead if a class is driven from character but not really using any of its character related features?

The actual biggest cost of the character class is the CharacterMovementComponent. Any character that is placed in the level will use it and hence have that overhead. Other than that actors in general have no cost unles they are ticking and/or being rendered.

If you go with using the character as a base you can always remove the movement component if you wont use it (and obviously not call any function that could use it or it will crash). Also disable ticking if you don’t need it.