I have a class that inherits from APaperCharacter, and I want to get the sprite instance from APaperCharacter and set its relative rotation with the code below.
The PaperCharacter.h and PaperFlipbookComponent.h files are saved in the same folder so when adding the include for PaperFlipbookComponent.h, there is no need for “Engine/” at the beginning.
Additionally, just as a coding practice it would be better, rather than accessing the RelativeRotation variable and setting it directly, to use the SetRelativeRotation() function which takes in an FRotator argument of what you want the new rotation to be.