Dynamic Flight with AI

I purchased a marketplace asset for dynamic flight, which works fine for my main character. However, I’m struggling with how to get it integrated properly with an enemy character.
I can get the enemy to follow me using “AI moveto”, but as soon as i get in the air, they stop following me. I am also using a purchased asset for 3d pathfinding, so that shouldnt be the issue either.
I think what I don’t understand is how to make the AI dynamically switch between walking and flying modes.
What is the best method for them to switch movement modes and to fly when needed?

You should be able to set the movement mode to EMovementMode::MOVE_Flying on the CharacterMovementComponent using the following function in C++ or Blueprint.

	/**
	 * Change movement mode.
	 *
	 * @param NewMovementMode	The new movement mode
	 * @param NewCustomMode		The new custom sub-mode, only applicable if NewMovementMode is Custom.
	 */
	UFUNCTION(BlueprintCallable, Category="Pawn|Components|CharacterMovement")
	virtual void SetMovementMode(EMovementMode NewMovementMode, uint8 NewCustomMode = 0);

Good luck!