Hey there. I struggle heavily when it comes to modular/extensible movement/input/animation.
The Implementation for different Movement Modes is not uniformly implemented. For example Walking uses the Velocity for the Blendspace in the AnimBP,
Climbing at a wall uses the Input directly in the AnimBP (by getting the inputvalue in a transition rule).
Climbing ontop of Obstacles uses AnimMontages.
What I want is a uniformly designed, easily extensible pattern for movement, Input and Animation.
First, I thought of a class “CustomMovement” that encapsulates the “Phys()” function we know from Phys() within the CharacterMovementComponent.
As soon as I have the movementmode set to “custom”, the Phys() function will delegate to this class/object’s Phys() function.
This allows encapsulation through inheritance/interface where Phys() can be implemented for different movement modes.
However, the Animation cannot be encapsulated that easily, You can’t exchange the Anim Instance of a Skeletal Mesh with smooth Transitions. The Input cannot be accessed in UObject classes either which makes this design pretty useless. If I could delegate the Input to these objects, that would be great. I could have different Input Behaviour for Walking, Swimming and Climbing without storing everything in the character class.
Do you have an idea how to get an easily extensible/modular/clean base for advanced movement modes?
Climbing, Rope Swinging, Balancing etc are movement modes I want to implement.