Download

Character & CharacterMovementComponent design question

I have some code in a subclass of ACharacter which slides along the ground based on the slope of the ground beneath the character, the player input direction, and which way the character is facing(Player input is less effective if the input is perpendicular to the character’s forward rotation) and rotates the character towards the new calculated velocity.
I also have code which checks to see if there is a suitable ledge in range to grab by overriding the MoveBlockedBymethod.

I’m wondering if instead of having these implementations defined in a character subclass it would be better to have the implementations defined in a CharacterMovementComponent subclass. I feel like it should but, I think it would have to be coupled to the character’s rotation regardless.
I’m not sure what the best approach here is so any help is appreciated.