How to make the character jump different distances relative to his running speed? (Root motion)

I have a character which walks/runs at different speeds, using Root Motion.

I have one jumping animation but I would like to adapt the jumping distance to the speed of the character just before the jump.

How do I adapt the jump distance to the running speed?

When you apply the movement of the jump…

Either get your Velocity from your CharacterController or your NavMeshAgent (if your not using these components to move then you have to otherwise manually save your last position and use that to find Velocity) and apply Vector to the movement of your ‘Jump’.

OOOOORRRRRR…

When you apply the movement of the jump, only apply movement that is relative to the ‘up and down’ of the scene, whilst making sure to check if you are on the ground (unless you want control in the air).