the problem is that by adding a delay to addforce my impulse becomes too great
if I remove the delay and the coroutine and run my animation script and the script with addforce at the same time, no more worries, but this is not the desired result
It seems to me like you are calling the JumpDo coroutine multiple times, I can’t see you resetting the values for jumpBufferCounter and coyoteTimeCounter in your script. If those values are not ressetted so that update can’t call the StartCoroutine it will keep adding force. Atleast that is what i see form the code. After Starting the coroutine you can just set jumpBufferCounter and coyoteTimeCounter to 0. Let me know if it solves your problem.
I finally solved the problem with @Archroda method. There was actually another conflict with my double jump and the coyote (on code not shown here), so I simply added an “else” if between my code launching the jump and the double jump instead of ifs separated and I have add a condition in my double jump:
&& coyoteTimeCounter <= 0
Then the delay added to the jump prevented the cut jump from reducing the jump when you release the jump button, so I added a condition to the jump to resolve this problem:
Finally you have to set the jumpBufferCounter = 0; at the start of the IEnumerator launching the animation, but coyoteTimeCounter = 0; can be put directly into the ForceJump() function
Normally everything works now (at least I hope ^^)
Thank you, it allowed me to understand that the problem did not come from AddForce directly but from before in my code (coyote and buffer). I wasn’t looking in the right place.