# Paper2D APaperCharacter doesn't slide

**URL:** <https://forums.unrealengine.com/t/paper2d-apapercharacter-doesnt-slide/617247>\
**Category:** C++\
**Tags:** unreal-engine, UE5-0, question, CPP\
**Created:** [July 29, 2022, 4:02pm UTC](https://forums.unrealengine.com/t/paper2d-apapercharacter-doesnt-slide/617247 "2022-07-29T16:02:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oziphantom](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@oziphantom](https://forums.unrealengine.com/u/oziphantom)\
**Post date:** [July 29, 2022, 4:02pm UTC](https://forums.unrealengine.com/t/paper2d-apapercharacter-doesnt-slide/617247/1 "2022-07-29T16:02:56Z")

</div>

Given APaperCharacter where I use `AddMovementInput(MovementVector * DeltaTime);` where _MovementVector_ is either -1.0,0.0 or 1.0 on it’s X component and is called in the _Tick_ event.

I have set

```auto
#define NormalGroundFriction 0.00f
#define SlideGroundFriction 0.00f
	Cast< UCharacterMovementComponent>(GetMovementComponent())->BrakingFriction = NormalGroundFriction;
	Cast< UCharacterMovementComponent>(GetMovementComponent())->GroundFriction = NormalGroundFriction;
	Cast< UCharacterMovementComponent>(GetMovementComponent())->bUseSeparateBrakingFriction = true;

```

I have also set those values to be `1.0f`, `0.5f`, `0.1f` and `0.0001f` all of which have not changed how the chracter slows down. I have added a debug print to verify that nothing else is setting the _GroundVelocity_ to something else, it’s still 0 during the game. Also setting it to `100.0f ` the player still moves as before.

What am I missing? Do I need to use another update function? Don’t call it with a zero vector? Some boolean or other control mode that is affecting the player I need to modify?

---

<div class="post-metadata">

**Author:** ![hedron](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hedron/32/591453_2.png) [@hedron](https://forums.unrealengine.com/u/hedron)\
**Post date:** [July 29, 2022, 5:40pm UTC](https://forums.unrealengine.com/t/paper2d-apapercharacter-doesnt-slide/617247/2 "2022-07-29T17:40:25Z")

</div>

Hi, oziphantom.

Check the field BrakingDecelerationWalking as well. This lowers velocity at a constant force while the character is walking; if you set this to a lower value then you should be able to see results when adjusting Braking and Ground friction.

Also: AddMovementInput / AddInputVector interfaces do not require DeltaTime in their calculations. CharacterMovementComponent handles its own time substepping; just add the normalized direction scaled against a ratio in the interval [0.0, 1.0]. For instance, when moving via an axis read value:

```auto
AddMovementInput(DirectionVector, AxisValue);

```

If neither of those options help, the following functions might be useful to study and override if necessary:

```auto
UCharacterComponent::CalcVelocity(float DeltaTime, float Friction, bool bFluid, float BrakingDeceleration);
UCharacterComponent::ApplyVelocityBraking(float DeltaTime, float Friction, float BrakingDeceleration);

```

UCharacterMovementComponent is pretty complicated because it supports networking; Just to get a general sense of what occurs for the “host” player (I am assuming your game is offline) you can follow the basic function call route of:  
TickComponent → PerformMovement → StartNewPhysics → Phys[MovementMode]  
Where [MovementMode] corresponds to the current EMovementMode. (PhysWalking, PhysFlying, etc.)

Good luck!

---

<div class="post-metadata">

**Author:** ![oziphantom](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@oziphantom](https://forums.unrealengine.com/u/oziphantom)\
**Post date:** [July 30, 2022, 7:10am UTC](https://forums.unrealengine.com/t/paper2d-apapercharacter-doesnt-slide/617247/3 "2022-07-30T07:10:31Z")

</div>

Indeed _BreakingDecelerationWalking_ was the solution, thank you.
