I am overriding the function NewFallVelocity in CharacterMovementComponent to calculate a new fall direction based on the current floor the player resides.
NewFallVelocity(FVector OldVelocity, FVector OldAcceleration, float timeTick)
I figured that when falling, all velocity calculations would be handled in this function. But that does not always seem to be the case. When jumping if the players velocity is pointing in the negative world Z axis then the player will jump about twice as high. After some testing I determined that the OldVelocity parameter is not coming into the function exactly as I had returned it. Meaning somewhere velocity is getting modified outside this function. I linked a video that shows the issue.
In the start of the video the player is jumping in the positive world Z axis. Then walks to the negative world Z axis. Notice that when jumping in the negative world Z axis the player Jumps about twice as high.
I have created a temporary fix by no longer using the OldVelocity Parameter and storing the last fall velocity in another variable and using it on the next update. I would prefer to use the OldVelocity parameter if possible to keep this less hacky.
Is there a bool to disable velocity getting modified outside of the NewFallVelocity function when jumping in the negative Z axis? If not can this be added?
I currently have bLimitFallAccel to false and tried enabling/disabling bForceMaxAccel and bForceRegularVelocity.