Skip to content

Commit acacffd

Browse files
authored
Prevent initial or ranged snapping in the editor. (#436)
1 parent 5dcc402 commit acacffd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

addons/godot-xr-tools/objects/snap_zone.gd

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,14 @@ func _ready():
7171
_update_snap_mode()
7272

7373
# Perform the initial object check when next idle
74-
call_deferred("_initial_object_check")
74+
if not Engine.is_editor_hint():
75+
call_deferred("_initial_object_check")
7576

7677

7778
# Called on each frame to update the pickup
7879
func _process(_delta):
79-
# Skip if not enabled
80-
if not enabled:
80+
# Skip if in editor or not enabled
81+
if Engine.is_editor_hint() or not enabled:
8182
return
8283

8384
# Skip if we aren't doing range-checking

0 commit comments

Comments
 (0)