Description

Force Next Floor Check doesn't work when the player is stopped, even though the tool tip says that it does.

User Description:

I'm trying to shrink / grow the collision capsule for our needs but when doing this resting on a flat surface, the physics re computation doesn't occur when the capsule is grown back to its proper height.

Basically, we shrink the capsule size down to half height = radius on the ACharacter when in flying mode, and set it back to normal when he is in walk mode. The mode itself can be toggled by the player.

This means that when the player is in "ball mode" in the air -> touches the ground -> goes back to walk mode, the capsule is the right size, but until the first movement is entered the capsule is "sunk" into the ground. I want the capsule to sit on the floor properly

I managed to solve this by doing the following:

after resizing the capsule to the original height, get Floor from the MovementComponent
get the line trace to floor, and if negative then set the player location to location + UpVector * (line trace to floor) value, with teleport set.
I still don't understand why the physics engine doesn't automatically fix the position after setting ForceFloorCheck is enabled and walk mode is set. Sean, any ideas?

Steps to Reproduce

1. Open the attached test project
2. PIE (see video for example)
3. Walk to the top of the ramp
4. Walk off of the right side
5. While falling with a downward momentum, press F to toggle Fly Mode
6. Allow the players legs to clip through the floor and move all the way to the wall on the right
7. Once stopped, press F again to toggle the movement mode back to Walking

Results: The players capsule will be clipped into the floor.

Expected: For the capsule to teleport upwards until the base is on the floor. This happens if the player moves after toggle back to Walking Mode.

From scratch:

1. Create a 3rd Person BP project
2. Open the ThirdPersonCharacter BP
3. In the CharacterMovement, Enable 'CanFly'
4. In the Event Graph, create the setup from Screenshot #1
5. Compile & save
6. Follow the rest of the steps above.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-36973 in the post.

0
Login to Vote

Fixed
ComponentUE - Gameplay - Player Movement
Affects Versions4.12.54.13.14.14
Target Fix4.16
Fix Commit3369924
Main Commit3380073
CreatedOct 6, 2016
ResolvedMar 29, 2017
UpdatedSep 17, 2020