Delete a Rigidbody2D with Kinematic2D

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Juda Nanas

Hello everyone,
I have to do the game “Mr Driller”, but I don’t know how I can delete :

  • the block from below when I “Input.is_action_pressed(“down”)”
  • the block on the left when I “Input.is_action_pressed(“left”)”
  • the block on the right when I “Input.is_action_pressed(“right”)”
    Thank you in advance :slight_smile:

I already have that:

elif (Input.is_action_pressed("down") and Input.is_action_pressed("click")):
	for body in blocks:
		if body.is_in_groups("Blocks"):

You need to give more information.

What is blocks?
Are you asking how to test the collision?
Do you want the player to move and delete the block they move into, or are they deleting an adjacent block without moving?

kidscancode | 2019-06-02 16:22