![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Bobigondo |
I’m trying to improve my fall height detection by getting the height from the peak of a jump.
It currently notes the difference between the translation.y at the start of the jump and at the end, which works fine mostly but isn’t accurate to the actual distance fallen.
How would I find when a kinematic body is losing height, so I can note that as the starting fall height?
I tried the below if statement as a shot in the dark, but obviously the -velocity.y part isn’t going to work.
if -velocity.y and !has_contact and !is_falling:
is_falling = true
fall_start = translation.y
Thanks.