I have a physics ball that I’m trying to make jump, add impulse works fine until the ball is falling down, the momentum of the fall change how much add impulse makes the ball jump.
Only when the ball is on the ground without any downwards momentum will it work correctly.
I mean, it already works correctly - as in, it’s physically correct. You can either override it with Set Linear Velocity (can be cumulative, too). Or add a larger impulse based on current velocity (projected if lateral movement is to be considered.
There’s also another consideration - what happens when when the ball is already going up and we jump.
Not sure, maybe I misunderstand something, would the override not shoot the ball up the same amount every time no matter what the downward momentum is?
I have a physics ball that I’m trying to make jump, add impulse works fine until the ball is falling down, the momentum of the fall change how much add impulse makes the ball jump.
Only when the ball is on the ground without any downwards momentum will it work correctly.
It’s unclear what is not working correctly.
the momentum of the fall change how much add impulse makes the ball jump.
I use a “line trace by channel” to check if there is ground under the ball, so when the ball is falling down and it close to the ground but not close enough to touch it, but the check can still reach the ground, when I press jump at that moment the ball just bounce slightly, instead of jumping up as usual.