Force Next Floor Check doesn't work when the player is stopped, even though the tool tip says that it does.
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?
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.
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.
There's no existing public thread on this issue, so head over toAnswerHub just mention UE-36973 in the post.