how to make godot check for collisions

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

I need to make a 2d door that when you run into it it changes over to a different scene how should I do this

Can you do it now?
Or is there anything else you want to know?

Help me please | 2021-08-19 08:04

I haven’t been able to test it yet but I will soon thankyou for providing the code

PopSquip | 2021-08-19 10:16

Ok!
Please mark the answer if it works :slight_smile:

Help me please | 2021-08-20 14:48

:bust_in_silhouette: Reply From: Help me please

Make your door Area2D and connect its body_entered signal then you can use it to change your scene

func _on_Door_body_entered(body):
    if body.name == "Player": # Make sure that the body is Player
        get_tree().change_scene("res://next_level")