Hi there,
I have two classes, one derived from APawn, and other derived from ACharacter. The first one is for the guard camera and the second one is for the bot that can move around. These two are mechanic and have similar properties and functionality, so I want to implement it in a generic parent class, say ABotMechanic. The problem is that I can't inherit two UObject classes, in other words
won't compile, because ABotPatrol tries to inherit two UObject subclasses.
Any ideas how to work around this problem?
Perhaps, deriving ABotMechanic from ACharacter, but is it good? For ABotCamera I don't need a movement component and other move-around stuff.
I have two classes, one derived from APawn, and other derived from ACharacter. The first one is for the guard camera and the second one is for the bot that can move around. These two are mechanic and have similar properties and functionality, so I want to implement it in a generic parent class, say ABotMechanic. The problem is that I can't inherit two UObject classes, in other words
Code:
class ABotMechanic: public APawn { ... }; class ABotCamera: public ABotMechanic { ... }; class ABotPatrol: public ACharacter, public ABotMechanic { .. };
Any ideas how to work around this problem?
Perhaps, deriving ABotMechanic from ACharacter, but is it good? For ABotCamera I don't need a movement component and other move-around stuff.
Comment