Tighter turns in Flying Mode on Character Movement Component

hi Dev People :slight_smile:

I’m trying to make the turns tighter on my flying character. I’m using Flying Mode on the Character Movement Component… I have a solution, but surely there is a better way?

At the moment, as @DrAculaMD says… it’s like Tokyo Drift, but in the sky :smiley:

Here are the solutions I’ve found so far to this… too much sideways skidding in the air… but surely there is something better:

  • BeginPlay - use Get Physics Volume node to set the friction of the default level physics volume from 1 (default) right up to 100 (multiply by 100). Then multiply Character Movement Max Acceleration also by 100, to compensate for the acceleration slowdown. This greatly improves air traction and seems to be the most performance-efficient and smoothest solution… but it’s still hacky imho.
  • Tick - use Calc Velocity node with the Character movement mode and set Friction to 100… basically as above, multiply Max Acceleration also by 100, to compensate.
  • Tick - use Add Force node in the same amount of the drift velocity (calculated by dot product) as described elsewhere on these forums.

So, if anyone knows a better way… feel free to shout. :smiley:

Thank you!!!

PS. I’m using the Character Movement Component and not the Floating Pawn Movement Component (which has Turning Boost), because replication is built in.

Hi, in your blueprint movement logic you could increase your turn rate (how much of the axis value you plug into the Add Controller Yaw Input). Then increase the Max Acceleration in the character movement.

Then you would fly like on rails (but would always accelerate instantly not only in curves). If you also want to stop immediately when letting go of a movement button you might also want to increase the Braking Friction Factor in the character movement.


Else what you could try (if you want to only make the curves sharper but not all acceleration) you might want to try this:

Get your current velocity and your velocity if it would go into your actors forward direction. Then lerp those two. You may wanna change the Interp Speed. But with that setup you would not be able to move sideways.

hi folks :slight_smile: I’m back looking at this issue… does anyone have any suggestions?

the simplest solution I’ve found to Tokyo drift in the sky… is to greatly increase the Character Movement (General Settings) Max Acceleration Rateto like 100,000 and above… higher acceleration rate means that the character simply speeds up quicker in the direction it’s pointing… i.e. a LOT less sideways skid and much more controllable

1 Like

I looked back into this, and even tried to add a Flying Pawn component to a Character so I could apply Turning Boost to make turns tighter. Regrettably, it didn’t work for me.

So I did the following, it works but (like most of the solutions in this thread) it seems a bit hacky. There are still a tiny amount of slippage:

I’m looking into this again… the following is my latest solution evolution, but it’s still a bit hacky. Can anyone else please help solve the drift issue while turning in UE5’s Character ‘Flying’ movement mode in a more native/elegant way? I’m trying to make turns in the air with less drift:
image

Elsewhere on the forums, @Yiannis128 suggested the following using the Friction value on Calc Velocity. It’s a lot more elegant than my solution, though still a bit hacky. Any suggested improvements, or new approaches welcomed!

Of course, it can also be used on Tick. In this instance, I just set the friction statically, so the character will slam to a stop awkwardly:

For testing purposes, here’s how to measure forward velocity, sideways and upwards drift (also velocity):

None of the above solutions completely eliminates the drift, but @Yiannis128 solution literally makes it 10 times better, and it’s not as finicky as my suggestions.

Ok, I’ve found a slightly better… but still hacky approach. I think it’s better than ‘CalcVelocity’ because smoothing the friction isn’t needed.

There is still a little slippage but it is about 20 times better. I’m using ‘AddImpulse’ instead of ‘AddForce’ because ticking the red box allows me to change the velocity directly (so mass is irrelevant).

Literally signed up just so I could post a “Thanks” to @DavidOConnor for this little snippet - Thanks! it does almost exactly what I want (I can ignore the tiny amount of slippage that’s there, this is so much better than the stock behaviour for what I want)

1 Like

@ChrisMcLaughlin Thank U Chris… may Ur games be excellent!

After some more experimentation, I changed to ‘Add Force’ from ‘Add Impulse’ (velocity change ‘on’).

I’m using ‘Add Force’ because it’s designed to fire continuously on ‘Tick’. But because ‘Add Force’ considers the character’s mass, I factored this in along with a multiplier of 10 (I don’t know why, it just works).

By the way, a multiplier of 100 gives even less slippage, but it occasionally sends the player flying off the map… especially at lower frame rates.

Yes, it’s still slightly hacky but imho it’s the best version I’ve come up with so far.

Hi, I’m trying to implement an arcade style Airship controller like Skies of Arcadia. I did this code in the Event Tick and it works really well. Hope this helps everyone.