Skip to content

Commit

Permalink
Fix RopeHandle sometimes not working
Browse files Browse the repository at this point in the history
  • Loading branch information
mphe committed Jul 28, 2024
1 parent bba353c commit 7a2615e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 0 additions & 6 deletions demo/addons/ropesim/BaseRopeTool2D.gd
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,13 @@ func use_nearest_position_to_point(point: Vector2) -> void:


func set_rope_path(value: NodePath) -> void:
if value == rope_path:
return

rope_path = value

if is_inside_tree():
_helper.set_target_rope_path(rope_path, self)


func set_enable(value: bool) -> void:
if enable == value:
return

enable = value
_helper.enable = value

Expand Down
3 changes: 3 additions & 0 deletions demo/addons/ropesim/RopeHandle.gd
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ func _move_point(idx: int, from: Vector2, to: Vector2) -> void:


func set_enable(value: bool) -> void:
if enable == value:
return

super.set_enable(value)

if enable:
Expand Down

0 comments on commit 7a2615e

Please sign in to comment.