Paper2d MultiDirection floaty movement

I’m currently attempting to make an isometric game, and I have set the movement component to flying, with no gravity. I have designed the proper air braking to give the walking effect a good feel but this works only when its uni-directional input. Once I start a multi-directional input, The movement component ignores braking and starts to “float” giving a drifting effect with the character. Going from UP + LEFT to LEFT causes the component to bank a little bit before course correcting to a full left direction. Same with any other multi-direction to uni-directional/multi-directional movement/direction. I was wondering if you had any suggestions to remove this banking effect currently happening.

// Configure character movement
	GetCharacterMovement()->DefaultLandMovementMode = MOVE_Flying;
	GetCharacterMovement()->GravityScale = 0.0f;
	GetCharacterMovement()->AirControl = 1600.80f;
	GetCharacterMovement()->bCheatFlying = true;
	GetCharacterMovement()->MaxFlySpeed = 600.0f;
	GetCharacterMovement()->BrakingDecelerationFlying = 500.f;
	GetCharacterMovement()->FallingLateralFriction = 0.f;

	GetCharacterMovement()->GroundFriction = 0.0f;
	GetCharacterMovement()->MaxWalkSpeed = 600.0f; //does nothing
	GetCharacterMovement()->BrakingDecelerationWalking = 3048.f;
	GetCharacterMovement()->JumpZVelocity = 1000.f;

	// Lock character motion onto the XZ plane, so the character can't move in or out of the screen
	GetCharacterMovement()->bConstrainToPlane = true;
	GetCharacterMovement()->SetPlaneConstraintNormal(FVector(0.0f, -1.0f, 0.0f));

	// Behave like a traditional 2D platformer character, with a flat bottom instead of a curved capsule bottom
	// Note: This can cause a little floating when going up inclines; you can choose the tradeoff between better
	// behavior on the edge of a ledge versus inclines by setting this to true or false
	GetCharacterMovement()->bUseFlatBaseForFloorChecks = true;

These are my current movement component settings for C++. I’m trying to get rid of the floaty movement. Any help in this will be greatly appreciated.

Thank You

As Written by Zak Middleton:

(towards the bottom)

you will only want to override CalcVelocity; Friction is used for turning in CalcVelocity with this code:


	// Friction affects our ability to change direction. This is only done for input acceleration, not path following.
	const FVector AccelDir = GetSafeNormalPrecise(Acceleration);
	const float VelSize = Velocity.Size();
	Velocity = Velocity - (Velocity - AccelDir * VelSize) * FMath::Min(DeltaTime * Friction, 1.f);

There is also the fluid friction applied right after that, if bFluid is true.

In your case I would probably override CalcVelocity to set bFluid to false when flying, and use your own friction setting for turning. You could get fancier if you care to only do this when there is acceleration (so you still have fluid friction when braking/coasting to a stop). Something like this:


void MyMovementComponent::CalcVelocity(float DeltaTime, float Friction, bool bFluid, float BrakingDeceleration)
		if (IsFlying())
				bFluid = false;
				Friction = MyFlyingFriction;
		Super::CalcVelocity(DeltaTime, Friction, bFluid, BrakingDeceleration);