How can i make simple blueprint to make my character fly in air?
It’s an old question, but I thought I’d answer it.
Have a blueprint based off Character. On this blueprint, there will be a Character Movement component. Click it, and then find an option that says CanFly and check it to true
-
Create an action that sets your character to flying. For example, we can use the space bar as StartFlying.
-
Place a reference to the CharacterMovement component in to the graph by holding ctrl and dragging it in.
-
Drag a wire from the movement reference and type Set Movement Mode in the context search.
-
Set the NewMovementMode to Flying from the drop down.
-
Right click a blank spot on the graph and then search for a node called Jump. Connect your StartFlying action in to the Jump node.
-
Finally, finish your execution path in to the SetMovementMode.
Now, go in to the game and test. Your character will jump and then start floating around. You will need to create additional movement inputs to make him go up and down and then maybe even to stop flying.