#Move_and_slide() trying to get it to work in godot 4

3 messages · Page 1 of 1 (latest)

grand vale
#

Maybe try doing knockback = get_real_velocity() at the end instead.

#

Just looking at the docs, I believe that should give you the right velocity you want. The velocity is more like the requested velocity, though it says it's modified by move_and_slide so I have no idea how this is actually supposed to be used. The documentation for this is pretty shoddy.

#

It just says the velocity is modified, but doesn't say in what way. get_real_velocity hints that the velocity property isn't what you think it should be.