If you feel as though I didn't do a great job explaining certain portions don't be afraid to ask me questions.
If you would like to play the game that I'm making these changes for: https://erros.itch.io/untitledgravity...
Supplementary Info:
0:53
The reason for not having the plugin installed through the engine while altering it in a project is sometimes the references to which folder to use for the plugin gets messes up so it will sometimes point to the version of the plugin (marketplace unaltered) you don't want to use
4:45
Note: The constructors as seen in the custom character and movement component need to be exactly what is shown except for the character. Which will be touched on when shown.
5:48
When I say alter here, I am talking about being able to redefine the variable, however redefining the variable will not redefine the variable type meaning you will probably end up recreating a class variable for your new custom movement component.
6:20
when initializing the movement component using the : operator, the class referenced between the angled brackets in SetDefaultSubObjectClass needs to be the name of your custom movement component in this case it is UNinjaCharacterMovementComponent for NinjaCharacterMovementComponent. Note there is a U in front of the class name, this has to do with how Unreal names certain components.
6:27
The reason for saving the movement component as a class variable is so you don't need to cast the character class movement component to your custom movement component, that inherits for the character movement component, every time you need to use it in a function. Instead you cast it once at the object's initialization and then reuse it through out your class's functions.
7:15
we are not commenting out cast to as the removal of it in the getNinjaCharacterMovement function makes the retrieval of the MovementComponent cheaper during running time but as seen I remove all function calls since we now have a local variable holding the reference, this does two things. 1. it keeps us from reallocating more memory to store a variable we already have defined in the class, and 2. what was just mentioned above cuts down on the running time operations needed to retrieve the movement component.