From 32f149ba86596d532cffb4ec0970361b816593ac Mon Sep 17 00:00:00 2001 From: karl Date: Sat, 1 Feb 2020 19:47:09 +0100 Subject: [PATCH] Tweaks for arm and leg --- BodyParts/HumanArm.gd | 2 +- BodyParts/HumanArm.tscn | 3 --- BodyParts/HumanLeg.tscn | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/BodyParts/HumanArm.gd b/BodyParts/HumanArm.gd index 3628e83..b1adb4d 100644 --- a/BodyParts/HumanArm.gd +++ b/BodyParts/HumanArm.gd @@ -11,7 +11,7 @@ func action(): func push(body): # We multiply by 0.1 because we only want it to spin slightly, it should mostly go up var offset = transform.basis.xform(touch_area.global_transform.origin - base.global_transform.origin) * 0.1 - var direction = (base.transform.basis.y - base.transform.basis.z).normalized() * 5.0 + var direction = -base.transform.basis.y * 5.0 base.apply_impulse(offset, direction) diff --git a/BodyParts/HumanArm.tscn b/BodyParts/HumanArm.tscn index 12159ce..0b5275b 100644 --- a/BodyParts/HumanArm.tscn +++ b/BodyParts/HumanArm.tscn @@ -27,9 +27,6 @@ shape = SubResource( 2 ) [node name="Mesh" parent="." index="2" instance=ExtResource( 4 )] transform = Transform( 2, 0, 0, 0, 2, 0, 0, 0, 2, -0.357728, -8.51476, 0 ) -[node name="Skeleton" parent="Mesh/Armature" index="0"] -bones/7/bound_children = [ NodePath("BoneAttachment") ] - [node name="BoneAttachment" type="BoneAttachment" parent="Mesh/Armature/Skeleton" index="1"] transform = Transform( 0.0638506, -0.727912, -0.682691, -0.242273, 0.652315, -0.718184, 0.968104, 0.211254, -0.134703, 0.0541456, 1.16231, 0.134369 ) bone_name = "bone_6" diff --git a/BodyParts/HumanLeg.tscn b/BodyParts/HumanLeg.tscn index 5b61969..fe91c50 100644 --- a/BodyParts/HumanLeg.tscn +++ b/BodyParts/HumanLeg.tscn @@ -34,9 +34,6 @@ transform = Transform( 2, 0, 0, 0, 2, 0, 0, 0, 2, -2.84217e-14, -4.37555, -0.049 [node name="Armature" parent="Mesh" index="2"] transform = Transform( 1.97878, 0, 0, 0, -1.97636, 0.0978612, 8.47033e-22, -0.0978612, -1.97636, -1.33227e-14, 2.34477, 0.0119585 ) -[node name="Skeleton" parent="Mesh/Armature" index="0"] -bones/2/bound_children = [ NodePath("BoneAttachment") ] - [node name="Cube" parent="Mesh/Armature/Skeleton" index="0"] transform = Transform( 1, 0, -8.88178e-16, -1.42109e-14, 1, -2.23517e-08, 4.44089e-16, 2.23517e-08, 1, 0, 0, 0 ) material/0 = SubResource( 3 )