Skip to content

Commit

Permalink
Prevent initial or ranged snapping in the editor. (GodotVR#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
Malcolmnixon committed Apr 4, 2023
1 parent 5dcc402 commit acacffd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions addons/godot-xr-tools/objects/snap_zone.gd
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,14 @@ func _ready():
_update_snap_mode()

# Perform the initial object check when next idle
call_deferred("_initial_object_check")
if not Engine.is_editor_hint():
call_deferred("_initial_object_check")


# Called on each frame to update the pickup
func _process(_delta):
# Skip if not enabled
if not enabled:
# Skip if in editor or not enabled
if Engine.is_editor_hint() or not enabled:
return

# Skip if we aren't doing range-checking
Expand Down

0 comments on commit acacffd

Please sign in to comment.