How to create flying Characters?

In my top-down game I need a player-controlled character that flies/hovers above the ground. Think of some old 80’s Arcade top-down games, where the player controlled a helicopter or airplane. The gameplay feels as if that character moves (i.e. walks) directly on the ground, but really it is constantly hovering a bit above the ground plane.

If possible I want to control that flying character from my Blueprints exactly as I would control a walking character. It should make use of Nav Meshes and so forth. The only difference is that it needs to have something like an offset to make it hover over the ground, and without the gravity pulling it back to the ground.

What would be the best way in UE4 to achive this?

Thanks for your reply. I have seen on the UE4 video tutorials page that one could also create a hovering effect for characters. This seems quite what I am looking for. Thus, in which cases (and why) do I need to set the “Can Fly” parameter for the Movement Component? (In your tutorial video thiat paramter has not been changed.)

Hey ,

In order to set up your character or NPC to flying, you’ll first need to make sure the Character Movement is set to the speed you’d like it to be while flying. You can see that by simply clicking on your Character Blueprint. Then, you’ll want to check the box in Movement Component for Can Fly.

You may want to look over some additional tutorials, especially if you’re making NPCs and are going to be using navigation meshes.

Below are a few tutorials or documentation I’ve gathered for you:

  • [Navmesh Content Examples][1]
  • [Creating Nav Mesh Bounds Volume][2]
  • [ NavMesh Search][3]
  • [ Flying AI Search][4]

Hopefully one of the tutorials will assist you with creating AI that fly around your map.

Cheers! :slight_smile:

Content Examples Sample Project for Unreal Engine | Unreal Engine 5.1 Documentation
[2]: https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/2/index.html
[3]: https://www./results?search_query=unreal+engine+4+navmesh
[4]: https://www./results?search_query=unreal+engine+4+flying+ai

Hey,

I’m glad that the tutorials provided are useful for you!

If you ever wanted to have a character that could easily fly with the click of a button, you’d need to set up the configuration of ‘can fly’ and you’d want to set the ‘fly speed’ as well. Then you’d go into the blueprint and set up a function such as: When I press ‘F’ the character will fly, when I press ‘C’ the player will descend.

Thanks! :slight_smile:

Yes, the videos are very good. Zak (?) is an excellent teacher!

But what I still don’t understand: Why do I need to set the “Can Fly” parameter, when I could achieve flying (hovering) without that parameter, as described in the tutorial video? What is the advantage of using that “Can Fly” parameter instead of using a force, as described in the video?

Hey ,

The ‘can fly’ option is for input values. So for example, if you wanted to make a superhero game…and someone could go from walking to flying with a click of a button. You’d set it up to where that character would be able to fly and within the blueprint you’d set it up with a button combination: When I press ‘F’ the character will fly, when I press ‘C’ the player will descend back to the ground.

[Input Action & Axis Mapping][1]

Thanks!

Input Action And Axis Mappings In UE4 - Unreal Engine

Da uma olhada no que esse fez

https://www./watch?v=_z3eaIIsqUY