About 'Polishing the Gane: The Jump Pad Bug'!

In this video (objectives)…

1 Make sure the Jump Pad works consistently 2 Limit fall speed

After watching (learning outcomes)…

Using clamp() to keep a value within range

(Unique Video Reference: 25_HD_GDT)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

My project has the same bug as yours. The bug is you can walk into the Jump Pad and the animation commences but the player doesn’t jump.

Setting up a collider to stop the character from walking through it or setting up a listener for a recent signal maybe. Decisions Decisions…

func fall(delta):
	if is_on_floor() or is_on_ceiling():
		motion.y = 0
	else:
		motion.y += GRAVITY * delta
	
	if position.y > world_limit:
		Global.GameState.end_game()
	
	motion.y = clamp(motion.y,(JUMP_SPEED * JUMP_BOOST), -JUMP_SPEED)

Privacy & Terms