Proper way to add custom logic
Hey everyone. My question is how am I suppose to go about adding my own custom C++/blueprint logic to objects in ue4? My confusion is explained better with an example. Say I want to create a character and so I go and inherit from ue4's character class. After a bit I find I want to add additional functionality to the movement component. Now I could just create my own c++ movement component and add it to my derived character class. The problem is wouldn't this be duplicating code since ue4's character class already comes with a movement component? I do not want to add movement component logic within my base character class because, as good OO design goes, I do not want to give that class multiple responsibilities.
Instead, if I decide to inherit my character from say ue4's pawn class, then I can add a custom movement component without worrying about duplicating code but then I wont get all the useful functions from ue4's character class. Am I thinking about this the wrong way? Are there better ways to handle this? Any help is appreciated.
asked Apr 30 '16 at 03:07 AM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here