Skip to content

Commit

Permalink
Turn off auto_calculate_length_and_angle on leaf bones
Browse files Browse the repository at this point in the history
Fix warnings "WARNING: No Bone2D children of node Chin. Cannot calculate
bone length or angle reliably. Using transform rotation for bone angle."

Those warnings were output for each Bone2D without any child Bone2D:
* Chin
* LeftFoot
* LeftHand
* RightFoot
* RightHand

Disabling the auto calculation seems to have filled in lengths and
bone_angles. Presumably these are the transform rotations that it would
use anyway.

Test
* run and jump around the world and animations look correct to me.
  • Loading branch information
idbrii committed Oct 22, 2023
1 parent a02cf15 commit 660ce99
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions 2d/skeleton/player/player.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -1811,6 +1811,9 @@ rest = Transform2D(1, 0, 0, 1, 0, -160)
position = Vector2(0, -49)
rotation = -0.0435718
rest = Transform2D(0.999999, 0.00169551, -0.00169551, 0.999999, 0, -49)
auto_calculate_length_and_angle = false
length = 16.0
bone_angle = -2.49648

[node name="RightArm" type="Bone2D" parent="Sprite2D/Skeleton2D/Hip/Chest"]
position = Vector2(80, -100)
Expand All @@ -1826,6 +1829,9 @@ rest = Transform2D(1, 0, 0, 1, -11, 97)
position = Vector2(13, 94)
rotation = 1.22745
rest = Transform2D(0.336639, 0.941634, -0.941634, 0.336639, 13, 94)
auto_calculate_length_and_angle = false
length = 16.0
bone_angle = 70.3277

[node name="LeftArm" type="Bone2D" parent="Sprite2D/Skeleton2D/Hip/Chest"]
position = Vector2(-100, -100)
Expand All @@ -1841,6 +1847,9 @@ rest = Transform2D(1, 0, 0, 1, -2, 95)
position = Vector2(9, 102)
rotation = 1.22983
rest = Transform2D(0.334394, 0.942433, -0.942433, 0.334394, 9, 102)
auto_calculate_length_and_angle = false
length = 16.0
bone_angle = 70.4641

[node name="LeftLeg" type="Bone2D" parent="Sprite2D/Skeleton2D/Hip"]
position = Vector2(-72, 26)
Expand All @@ -1855,6 +1864,9 @@ rest = Transform2D(1, 0, 0, 1, -13, 91)
[node name="LeftFoot" type="Bone2D" parent="Sprite2D/Skeleton2D/Hip/LeftLeg/LeftLowerLeg"]
position = Vector2(7, 127)
rest = Transform2D(1, 0, 0, 1, 7, 127)
auto_calculate_length_and_angle = false
length = 16.0
bone_angle = 0.0

[node name="RightLeg" type="Bone2D" parent="Sprite2D/Skeleton2D/Hip"]
position = Vector2(46, 11)
Expand All @@ -1870,6 +1882,9 @@ rest = Transform2D(1, 0, 0, 1, -26, 94)
[node name="RightFoot" type="Bone2D" parent="Sprite2D/Skeleton2D/Hip/RightLeg/RightLowerLeg"]
position = Vector2(2, 129)
rest = Transform2D(1, 0, 0, 1, 2, 129)
auto_calculate_length_and_angle = false
length = 16.0
bone_angle = 0.0

[node name="Polygons" type="Node2D" parent="Sprite2D"]

Expand Down

0 comments on commit 660ce99

Please sign in to comment.