x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How would I go about making flying mechanics for a dragon?

The best example I found was this video for what I'm looking to (hopefully) achieve. I've gotten as far as pressing a button to enable/disable flight, and actually moving in-flight along the X and Y axis. But that's about it... Doesn't help that there's practically no tutorials around to help with it. Any help is appreciated!

Product Version: UE 4.19
Tags:
more ▼

asked May 12 '18 at 08:43 PM in Blueprint Scripting

avatar image

Odey555
3 1 3

avatar image Nebula Games Inc May 12 '18 at 11:11 PM

That video looks like a complex sequence of animations. Not sure what exactly you are trying to do when you say "flying mechanics"....are you asking for someone to tell you how to animate a dragon? Because that isn't something anyone can just "tell" you how to do. Are you asking for how to create path finding logic for a flying creature? Are you trying to figure out how to make "flight controls" for basically any flying pawn? These are all very different questions with varying degrees of difficulty to accomplish. A bit more clarity form your end would help.

avatar image Odey555 May 12 '18 at 11:14 PM

Yeah sorry for being vague, you're 100% right. What I meant was flying mechanics, pretty much being able to take off only when jumping (in the air), auto-switching to walk mode when the player collides with the ground, and how to make the player go up/down when in flight.

avatar image Nebula Games Inc May 12 '18 at 11:32 PM

Well that's still a bunch of stuff but to get you started, there are built in movement mechanics in a player character BP class, you would easily be able to switch from default "walking" to "flying" by changing the movement type, I forget what the exact nodes are but you can search for them. So on overlap with the ground or on hit with the ground etc, switch the default movement type from flying to walking. As for flight controls, there are many ways you could go about implementing them. But they all revolve around picking some button or key to direct the forward movement, left/right/up/down. You need to have some axis mapping for those movements. You can "add actor world offset", you can give flying things a projectile movement component and modify the "velocity" vector to direct it where you want, you can use physics thrusters (haven't done much with those personally), there are a million ways to do this just have to start building the logic yourself and see where you get. Straight up asking for "flight controls" will be hard to get here. Something more specific you have issues with later on would prob be better for us to help with.

avatar image SHOBBIT May 13 '18 at 05:36 AM

For a starting point, the UFO in the Learn tab project Features tour 2014 has quite a good flying and hover, mechanics, you should check it out. Also, you can check out the Fish in the content example project to see that snake like wavy motion/ also the swimming motion.

I think those two projects will be a very good place to start.

avatar image Odey555 May 16 '18 at 02:25 AM

So an update, I was able to get the flying down and when the character touches the ground it switches back to walking. However, I can't seem to figure out how to get him to switch to walking only when touching the ground. If he hits a wall he also switches back to walking. My 2nd problem is how can I stop the player from going into fly mode while on the ground, as of right now I've got this BP for the player characteralt text but its got the problem that I would switch to walking if I hit a wall. Any ideas? Also if you can suggest some quick workaround for the player only being able to enter flight in the middle of a jump that'd be great! Any help appreciated :)

avatar image Nebula Games Inc May 16 '18 at 02:32 AM

Whatever the input is to "jump" should switch a boolean to "true" after pressed, then if the flight button is pressed it will check this boolean if true (meaning jump was pressed just before, go to flight mode, if not, do nothing) On impact with the ground set this boolean to false. As for the walking occuring when hitting a wall, you could just make your "ground" have a custom collision type and only when colliding with that type switch to walk mode.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Nebula Is Right. What You need to do is somehow trigger a event / change mode when the dragon's Claws/ Feet Touches the ground. Else if u collide with a wall it is going to change ur mode to Walking. However Here are the things u need to look into: 1-) Changing Movement Modes on Different events 2-) Animations - Search Youtube for This.

more ▼

answered May 13 '18 at 06:07 AM

avatar image

SupDeity
318 3 6 15

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

So As I have Already Said:

Try Using a Key For Changing modes instead for example a key for landing.

also i dont get what do you mean by changing mode to only walking?. Just Set The Mode To Walking Thats it.

You Can Have A Button For Fly Or If You Want your character to fly only while falling u can try using the node "is Falling"

i can think u need to drag out a pin from the Movement Component [The Character Movement.] and then create the is falling node from there.

Also Raytracing might work. but i suggest having a collision or tag of some sort for landing.

in Bigger Worlds this might be a problem thou. but if u can get the claws of the dragon have collision it would be better and easier.

i dont know if raytracing will work this way at all. but if u can make a raytrace for checking if there is anything downside within a small raytrace length the dragon will be able to land. Use Timers for Raytracing and use booleans so that if there is ground and user presses a specific key he will land (which might also trigger another bool)

more ▼

answered May 17 '18 at 11:00 AM

avatar image

SupDeity
318 3 6 15

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question