My apologies for the rambling nature of this question; in a way it’s two questions
- how should I go about this with regards to game logic?
- how should I go about it with regards to workflow/tools?
My goal is to have a humanoid character that can walk, run and jump when on the ground, but is also capable of flying. I’d like to be able to use flight in two ways:
- holding the jump button would enter flight mode until released, increasing height while held
- pressing some other button would toggle flight mode on and off, and holding the jump button in this mode would increase height
I’d also like to try applying forces such as wind to the character while flying.
I’m a bit lost as to how I should approach this problem though.
Regarding workflow/tools, I have experience with C++, but this seems like the sort of thing Blueprints are for since much of the functionality seems to be implemented already. My last real experience with the Unreal engine though was making a few mods and a map for UT99, so I have no clue whether the proper way to do these things is through Blueprints or C++.
Regarding game logic, what I’ve seen thus far are that there are movement modes, and also ways to apply a force or vector. I’ve looked a little bit at trying to make these things work through the blueprint and this is what I’ve seen.
Regarding using the movement mode, I see it’s possible to set the “Default Land Movement Mode” to flying. However, that seems to prevent the character from being able to walk. So I tried creating a “Key Event” and figured I’d have that toggle the movement mode, but I don’t see an option to actually toggle that.
This lead me to wonder if applying a vector to the character is the expected route - but if doing that, the character doesn’t know its state, so it wouldn’t, for instance, do any flight animations, I assume.
I suppose a third approach could be to have the character monitor the physics applied to it and determine the proper animation to use based off this. I can see some potential good things with this route, but also potential for unpredicted behavior.
Thank you for taking the time to read this!