How to make character fly

Hi, I have a character that can switch between a player and a drone. I want to move the drone on the z axis. AddMovementInput doesn’t seem to like moving on the z axis and from what i’ve gathered you need to enable flight or disable gravity. I have tried both ways and I cannot figure it out. How can I make my drone fly?

Thank you


I made 2 axis inputs for up and down. The axis that is meant to move your drone down would be -1 or what ever number you choose and the other axis would 1.

When you want to switch to fly or walk mode, use set movement mode and change it to flying or walking. Make sure you have Can fly true in your character movement component.

image
Let me know if this is what you were looking for.