Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | animanoir |
I want that when the player/camera touches/enter an area to change to another scene.
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | animanoir |
I want that when the player/camera touches/enter an area to change to another scene.
Reply From: | Gluon |
You would need something to trigger the change, so either have an area2d or a collision box so you know when the player has stepped there. You can then put some code in so maybe set up a signal with a on_body_entered signal for example. connect that to a function once there you can change scenes with code like this
get_tree().change_scene("res://Menu/MenuScreen.tscn")