More about bug!

For me the bug not only affected the jump pads, but also the spike traps.

After applying your fix, the jump pads became better, but still could fall through now and then. And the spikes were still fifty fifty, So i took a look at the Fall function and made a small tweak to the if statement, and now everything works flawlessly for me.

func fall(delta):
	if (is_on_floor() and motion.y > 0) or is_on_ceiling():
		motion.y = 0
	else:
		motion.y += GRAVITY * delta
		
	if position.y > bounds_bottom:
		Global.GameState.end_game()

	motion.y = clamp(motion.y, (JUMP_SPEED * JUMP_BOOST), -JUMP_SPEED)

This change takes falling speed into account. So if you are on the floor and not falling, your speed won’t be reset and can be launched again.

Hope this is to some help for someone.

5 Likes

Privacy & Terms