CharacterMovement: Based velocity is not framerate independent

Version: Tested on 4.8.3 but pretty sure its in 4.10 as well

Based velocity and therefore GetImpartedMovementVelocity is not framerate independent making first-person-character movement inconsistent.

You can set this up with a first-person character jumping off a lift. Say the lift moves up with 700m/s then you would get 700m/s added to your normal jump velocity making you jump higher (to debug you can print CharacterMovement->GetImpartedMovementVelocity node).

However if you have a low framerate (t.maxFPS 10) you jump much higher (say 2000m/s with the same setup) as Unreal seems to calculate based velocity based on framerate dependent position differences.

Now I did not check the code for this and I might make a workaround ignoring native based velocity but this seemed like an issue that should get investigated.

Hi

  • How are you setting up your lift information as well as your jump velocity?
  • Do you have anything running off of tick or any other framerate dependent event/information (such as Delta seconds)?
  • Does this occur in a clean, blank project with no additional content or is it limited to one project?

Hey ,
the lift moves with constant velocity (700m/s) using a timeline (simple linear interpolation), the jump is done using LaunchCharacter but this should be irrelevant as you can see the incorrect value returned by CharacterMovement->GetImpartedMovementVelocity node. There is nothing that runs off tick related to this. Yes this also occurs on a clean project.

I was able to reproduce this on my end and have entered a bug report, UE-22695, to be assessed by the development staff.

I believe the problem is that we ask the physics engine to determing the velocity of animated objects, but we have a maxmimum physics timestep of 30fps (0.033 seconds). If the frame rate drops below that, the calculated velocity will be higher (you have effectively moved the distance in less simulated time). You might want to try increasing the MaxPhysicsDeltaTime setting under Physics Settings.

For the record increasing MaxPhysicsDeltaTime will indeed reduce the issue for lower framerates as stated but it does not seem like a clean solution. I have personally fixed it by storing the actual velocity in the lift and applying the impartedvelocity then myself but I was hoping that you could fix it in a generic way for everyone. Either way thanks for letting me know.