diff --git a/BodyConfig/bodyBuildingScript.gd b/BodyConfig/bodyBuildingScript.gd index 23c5e02..ceebba8 100644 --- a/BodyConfig/bodyBuildingScript.gd +++ b/BodyConfig/bodyBuildingScript.gd @@ -78,10 +78,12 @@ func _input(event): if event is InputEventMouseButton: if event.pressed: if _viewport.get_viewport().get_mouse_position().x >= 0: - if event.button_index == BUTTON_WHEEL_UP: - _attachment_point.get_node("Limb").rotate_z(0.1) - elif event.button_index == BUTTON_WHEEL_DOWN: - _attachment_point.get_node("Limb").rotate_z(-0.1) + if event.button_index == BUTTON_WHEEL_UP and _attachment_point != null: + if _attachment_point.get_node("Limb") != null: + _attachment_point.get_node("Limb").rotate_z(0.1) + elif event.button_index == BUTTON_WHEEL_DOWN and _attachment_point != null: + if _attachment_point.get_node("Limb") != null: + _attachment_point.get_node("Limb").rotate_z(-0.1) else: _prev_mouse_pos = event.position _viewRot = true diff --git a/BodyParts/BodyBase/AttachmentPoint.tscn b/BodyParts/BodyBase/AttachmentPoint.tscn index c123639..c91a9e5 100644 --- a/BodyParts/BodyBase/AttachmentPoint.tscn +++ b/BodyParts/BodyBase/AttachmentPoint.tscn @@ -7,7 +7,7 @@ [node name="AttachmentPoint" type="Spatial"] [node name="Mesh" type="MeshInstance" parent="."] -transform = Transform( 0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0, 0 ) +transform = Transform( 0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0, 0 ) mesh = SubResource( 1 ) material/0 = null diff --git a/BodyParts/BodyBase/BodyBase.tscn b/BodyParts/BodyBase/BodyBase.tscn index 3ab949a..0ae8c54 100644 --- a/BodyParts/BodyBase/BodyBase.tscn +++ b/BodyParts/BodyBase/BodyBase.tscn @@ -19,14 +19,20 @@ mesh = SubResource( 1 ) material/0 = null [node name="TorsoCollider" type="CollisionShape" parent="."] -transform = Transform( 0.8, 0, 0, 0, 0.8, 0, 0, 0, 0.8, 0, 0, 0 ) +transform = Transform( 2.5, 0, 0, 0, 2.5, 0, 0, 0, 2.5, 0, 0, 0 ) shape = SubResource( 2 ) -[node name="FrontLeft" parent="." instance=ExtResource( 2 )] -transform = Transform( 0.5, -1.62921e-07, -0.866025, -3.25841e-07, -1, 0, -0.866025, 2.82187e-07, -0.5, 0.6, 0, 1 ) +[node name="DownFrontLeft" parent="." instance=ExtResource( 2 )] +transform = Transform( 0.996194, 3.24601e-07, -0.0871556, 3.25841e-07, -1, 0, -0.0871556, -2.83989e-08, -0.996194, 1.5, 1.1, 4.2 ) -[node name="FrontRight" parent="." instance=ExtResource( 2 )] -transform = Transform( 0.5, -7.54979e-08, 0.866025, -1.50996e-07, -1, 0, 0.866025, -1.30766e-07, -0.5, -0.6, 0, 1 ) +[node name="DownFrontRight" parent="." instance=ExtResource( 2 )] +transform = Transform( 0.982402, -3.24601e-07, 0.0859489, -3.2133e-07, -1, 0, 0.0859489, -2.83989e-08, -0.982402, -1.5, 1.1, 4.2 ) + +[node name="DownBackRight" parent="." instance=ExtResource( 2 )] +transform = Transform( 0.982402, -3.24601e-07, 0.0859489, -3.2133e-07, -1, 0, 0.0859489, -2.83989e-08, -0.982402, -1.9, -1, 3.6 ) + +[node name="DownBackLeft" parent="." instance=ExtResource( 2 )] +transform = Transform( 0.982402, -3.24601e-07, 0.0859489, -3.2133e-07, -1, 0, 0.0859489, -2.83989e-08, -0.982402, 1.9, -1, 3.6 ) [node name="Torso" parent="." instance=ExtResource( 3 )] -transform = Transform( 0.2, 0, 0, 0, -8.74228e-09, 0.2, 0, -0.2, -8.74228e-09, 0, 0, 0 ) +transform = Transform( 0.5, 0, 0, 0, -2.18557e-08, 0.5, 0, -0.5, -2.18557e-08, 0, 0, 0 ) diff --git a/Ingame/Testing.tscn b/Ingame/Testing.tscn index 147d71c..66c4334 100644 --- a/Ingame/Testing.tscn +++ b/Ingame/Testing.tscn @@ -17,20 +17,19 @@ script = ExtResource( 4 ) [node name="Torso" parent="." instance=ExtResource( 3 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0 ) -[node name="Arm" parent="Torso/FrontLeft/Limb" index="0" instance=ExtResource( 1 )] -key = 81 - -[node name="Arm" parent="Torso/FrontRight/Limb" index="0" instance=ExtResource( 1 )] -key = 87 - [node name="Torso2" parent="." instance=ExtResource( 3 )] transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 2, -10 ) -[node name="Arm" parent="Torso2/FrontLeft/Limb" index="0" instance=ExtResource( 1 )] -transform = Transform( 1, 2.84217e-14, 0, -2.84217e-14, 1, 0, 0, 0, 1, 0, 0, 0 ) -key = 79 +[node name="Arm" parent="Torso2/DownFrontLeft/Limb" index="0" instance=ExtResource( 1 )] +key = 65 -[node name="Arm" parent="Torso2/FrontRight/Limb" index="0" instance=ExtResource( 1 )] +[node name="Arm" parent="Torso2/DownFrontRight/Limb" index="0" instance=ExtResource( 1 )] +key = 83 + +[node name="Arm" parent="Torso2/DownBackRight/Limb" index="0" instance=ExtResource( 1 )] +key = 81 + +[node name="Arm" parent="Torso2/DownBackLeft/Limb" index="0" instance=ExtResource( 1 )] key = 80 [node name="CameraFocus" type="Spatial" parent="."] @@ -41,12 +40,12 @@ transform = Transform( -4.2222e-08, -0.707107, 0.707107, -1.13133e-08, 0.707107, [editable path="Torso"] -[editable path="Torso/FrontLeft"] - -[editable path="Torso/FrontRight"] - [editable path="Torso2"] -[editable path="Torso2/FrontLeft"] +[editable path="Torso2/DownFrontLeft"] -[editable path="Torso2/FrontRight"] +[editable path="Torso2/DownFrontRight"] + +[editable path="Torso2/DownBackRight"] + +[editable path="Torso2/DownBackLeft"]