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.
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.)
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:
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.
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?
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.