I’m not a fan of those general question but after trying and trying with no success I just need someone here who knows how to do it to explain how I would actually do it.
Basically what I’m trying to do is the following: I need AI Characters with the CharacterMovementCompoment to “walk” in my landscapes using the flying mode, since this mode costs the least amount of performance. I don’t have any collision enabled on my AI, again because of performance, so I want to use RVO Avoidance. RVO however is not working in the flying mode, so I want to make a custom movement mode which is basically a one to one copy of the flying mode with RVO updates included. I already found all the code and functions I think I will need for this. However I can’t figure out how to actually set the custom movement mode up.
I’ve created a new C++ class derived from the character movement component. In there I override the function PhysCustom() which would be my Custom Movement Mode. I don’t need more than one custom mode.
However now starts my problem. I can’t delete the standard Movement Mode from a character class and put my own in it. So as far as I understand I have to create a class which derives from the Character class and override the constructor to to load my new Movement component instead. I’ found an old wiki article that explains this part but it seems to be outdated because the code doesn’t work anymore. So all I”m really asking for is, how do I need to write my character class to properly use my custom movement component? Maybe the wiki does work and I’m just missing an include? Here is the article to this: https://answers.unrealengine.com/que…ment-mode.html This is the approached I tried but it’s clearly outdated and doesn’t compile like this: I’m basically looking for this part:
APlayerGhost::APlayerGhost(const class FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer.SetDefaultSubobjectClass<UClimbingMovementComponent>(ACharacter::CharacterMovementComponentName))