Air Control for mouse movement

Hello everybody,

Is it possible to get air control for the player as shown in following gif using blueprints?

In the default First Person Class Air Control seems to mean that you can move using the keys on your keyboard while in-air, but no mouse control.
Hope someone can help me. :slight_smile:

You can’t look around while jumping in the air with the FPS template? I seem to be able to :\

I ccan look around, but I want to be able to move in-air in the direction I look.

Those are some very specific GoldSrc physics, I don’t think you can do that in Blueprints. With C++ you could create a custom CharacterMovementComponent, and override a good bit of code to achieve this kind of result. If you feel up to it, you could look at the QuakeWorld source code for pointers, because that’s what GoldSrc is based on and still has similar physics funnily enough.

If you just want to be able to turn in mid-air, a hack I could think of for Blueprints is to set air control to something high only when the forward key is pressed (nothing else), then you get some air control based on moving towards the direction you are looking, without being able to strafe sideways in mid air. You could customise it even more by setting air control based on player velocity, so you cannot start moving forward in mid air.

I just want to turn in mid-air, but this should also working when pressing the right or left key. (This is for bunnyhop in UE4, just missing the turning part by now)
How would I decide or calculate how much air control to give?

I don’t see how to do that, since strafing left or right will accelerate sideways, and if you do that with a large air control value, you will just move sideways instead of the direction you are looking at. The reason it works like that in CS like I said is based on the physics, which go back to QuakeWorld. I’m not aware of any obvious way to “fake this”, so your best bet is probably to rewrite the actual movement physics by implementing your own CharacterMovementComponent with C++.

Hey , I actually found a way to do this in blueprints…it was not easy, but it is possible. You really need to look at and understand how air acceleration movement works in other engines and then try to translate that on top of how unreal handles its own movement, but it is not very straightforward to implement. Good timing for your question as I just posted after the many months I’ve been working on this:

This looks like a good starting point if you want to go down the road of implementing it yourself:
http://flafla2.github.io/2015/02/14/bunnyhop.html

In the simplest terms I overrode UE4’s air control with my own function which takes into account your turning vs the previous tick and adds an impulse in your current facing direction for that tick.

Interesting, so you essentially overwrite Velocity in the Blueprint tick event of the character pawn? I guess that would work, but sounds like you would have to reimplement a lot more functionality than by just extending the key functions from the movement component in C++. In particular the network optimisation is pretty intricate, and I don’t think I would feel comfortable doing this all in Blueprint. But of course that makes it much easier to share it. Thisis my version BTW. Perhaps I can find a good way to share this in the future.