godot 4.2.1
making a Doors/Pressure style game here on godot, got the basics down except for:
preventing room clipping!!!
anyone know a good way to go about not letting that happen?
current code:
func _generateroom():
#array of rooms to make
rooms = {
0: load("res://Room_recration.tscn"),
1: load("res://test_room.tscn"),
2: load("res://corner_room_test.tscn"),
3: load("res://test_corner_that_goes_the_other_way.tscn")
}
#selects the room and adds it to the parent scene
new_room = rooms[randi_range(0, 3)].instantiate()
parent.add_child(new_room)
new_room.global_position = endpoint.global_position
new_room.rotation = endpoint.global_rotation