-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a fully working RR-Comparison and did a massive refactor of the…
… code I could clean some code by simply deleting now unused variables. Also the RRComparison seems to be working fine apart from a sometimes disapearing TwoBoneIK. SkeletonModification2DSlider is still not able to work (see issue #2) but I had forgot to push the project file which contains a reference to the class.
- Loading branch information
pwab
committed
Sep 5, 2020
1 parent
ffac99d
commit e33fae5
Showing
8 changed files
with
242 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
extends Position2D | ||
|
||
var target_nodes | ||
@onready var active = false | ||
|
||
func _ready(): | ||
target_nodes = [ | ||
get_parent().get_node("RR_FABRIK_Target"), | ||
get_parent().get_node("RR_CCDIK_Target"), | ||
get_parent().get_node("RR_TwoBoneIK_Target") | ||
] | ||
|
||
func _process(delta): | ||
if active: | ||
var position_delta = get_global_mouse_position() - self.global_position | ||
for target in target_nodes: | ||
target.position += position_delta | ||
|
||
func _input(event): | ||
if active: | ||
if event is InputEventMouseButton and not event.is_pressed(): | ||
active = false | ||
|
||
func _on_Tip_input_event(viewport, event, shape_idx): | ||
if event is InputEventMouseButton and event.is_pressed(): | ||
active = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.