Fixed reactivation problems

This commit is contained in:
2024-08-28 16:41:02 +03:00
parent 7486334c04
commit bbb13546b1
9 changed files with 310 additions and 15 deletions

View File

@@ -126,14 +126,16 @@ func mouse_press(position):
if mode == 0:
print("get closest building")
$WorldEditor.editor_command("get_closest_building", [Transform(Basis(), proj)])
elif mode == 1:
$WorldEditor.editor_command("checkpoint", [])
elif mode == 2:
$WorldEditor.editor_command("checkpoint", [])
var m = proj
m.y = selected_building_xform.origin.y
var xform = selected_building_xform.looking_at(m, Vector3.UP)
$WorldEditor.editor_command("update_building_transform", [selected_building, xform])
$building_rot_cursor.global_transform = xform
selected_building_xform = xform
$WorldEditor.editor_command("buildings_checkpoint", [])
var selected_building
var selected_building_xform