diff --git a/3D Input/Bein_Mensch.blend b/3D Input/Bein_Mensch.blend deleted file mode 100644 index f45e647..0000000 Binary files a/3D Input/Bein_Mensch.blend and /dev/null differ diff --git a/3D Input/Bein_Pferd.blend b/3D Input/Bein_Pferd.blend deleted file mode 100644 index 1944215..0000000 Binary files a/3D Input/Bein_Pferd.blend and /dev/null differ diff --git a/3D Input/Fertige GLBs/Kopf_Mensch.glb b/3D Input/Fertige GLBs/Kopf_Mensch.glb new file mode 100644 index 0000000..757bc78 Binary files /dev/null and b/3D Input/Fertige GLBs/Kopf_Mensch.glb differ diff --git a/3D Input/Kopftextur.png b/3D Input/Kopftextur.png new file mode 100644 index 0000000..fc61bd2 Binary files /dev/null and b/3D Input/Kopftextur.png differ diff --git a/3D Input/Mensch_Hand.blend b/3D Input/Mensch_Hand.blend index 37550ce..9e466a3 100644 Binary files a/3D Input/Mensch_Hand.blend and b/3D Input/Mensch_Hand.blend differ diff --git a/3D Input/Mensch_Hand.blend1 b/3D Input/Mensch_Hand.blend1 index 9c1b4a0..5832746 100644 Binary files a/3D Input/Mensch_Hand.blend1 and b/3D Input/Mensch_Hand.blend1 differ diff --git a/3D Input/Mensch_Kopf.blend b/3D Input/Mensch_Kopf.blend new file mode 100644 index 0000000..6883481 Binary files /dev/null and b/3D Input/Mensch_Kopf.blend differ diff --git a/3D Input/Mensch_Kopf.blend1 b/3D Input/Mensch_Kopf.blend1 new file mode 100644 index 0000000..d6985aa Binary files /dev/null and b/3D Input/Mensch_Kopf.blend1 differ diff --git a/3D Input/beinimage.png.import b/3D Input/beinimage.png.import index 9f17b69..d850013 100644 --- a/3D Input/beinimage.png.import +++ b/3D Input/beinimage.png.import @@ -2,33 +2,35 @@ importer="texture" type="StreamTexture" -path="res://.import/beinimage.png-a7e3863a81de772333653d8998415984.stex" +path.s3tc="res://.import/beinimage.png-a7e3863a81de772333653d8998415984.s3tc.stex" +path.etc2="res://.import/beinimage.png-a7e3863a81de772333653d8998415984.etc2.stex" metadata={ -"vram_texture": false +"imported_formats": [ "s3tc", "etc2" ], +"vram_texture": true } [deps] source_file="res://3D Input/beinimage.png" -dest_files=[ "res://.import/beinimage.png-a7e3863a81de772333653d8998415984.stex" ] +dest_files=[ "res://.import/beinimage.png-a7e3863a81de772333653d8998415984.s3tc.stex", "res://.import/beinimage.png-a7e3863a81de772333653d8998415984.etc2.stex" ] [params] -compress/mode=0 +compress/mode=2 compress/lossy_quality=0.7 compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 -flags/repeat=0 +flags/repeat=true flags/filter=true -flags/mipmaps=false +flags/mipmaps=true flags/anisotropic=false -flags/srgb=2 +flags/srgb=1 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false process/invert_color=false stream=false size_limit=0 -detect_3d=true +detect_3d=false svg/scale=1.0 diff --git a/3D Input/gorilla hand unwrapped.blend b/3D Input/gorilla hand unwrapped.blend new file mode 100644 index 0000000..b03d44f Binary files /dev/null and b/3D Input/gorilla hand unwrapped.blend differ diff --git a/3D Input/gorilla hand unwrapped.blend1 b/3D Input/gorilla hand unwrapped.blend1 new file mode 100644 index 0000000..3c9f5fb Binary files /dev/null and b/3D Input/gorilla hand unwrapped.blend1 differ diff --git a/BodyConfig/bodyBuildingScript.gd b/BodyConfig/bodyBuildingScript.gd index 4e39e0c..f3d70e8 100644 --- a/BodyConfig/bodyBuildingScript.gd +++ b/BodyConfig/bodyBuildingScript.gd @@ -81,10 +81,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/BodyParts/HumanLeg.gd b/BodyParts/HumanLeg.gd new file mode 100644 index 0000000..3d5807c --- /dev/null +++ b/BodyParts/HumanLeg.gd @@ -0,0 +1,25 @@ +extends PushingBodyPart + + +onready var anim = get_node("Mesh/AnimationPlayer") + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +func action(): + anim.play("ArmatureAction") + + +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(Vector3.ZERO) + var direction = (base.transform.basis.y - base.transform.basis.z).normalized() * 5.0 + + base.apply_impulse(offset, direction) + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta: float) -> void: +# pass diff --git a/BodyParts/HumanLeg.tscn b/BodyParts/HumanLeg.tscn new file mode 100644 index 0000000..62ab694 --- /dev/null +++ b/BodyParts/HumanLeg.tscn @@ -0,0 +1,48 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://BodyParts/PushingBodyPart.tscn" type="PackedScene" id=1] +[ext_resource path="res://BodyParts/HumanLeg.gd" type="Script" id=2] +[ext_resource path="res://3D Input/Fertige GLBs/Bein_Mensch.glb" type="PackedScene" id=3] +[ext_resource path="res://3D Input/beinimage.png" type="Texture" id=4] + +[sub_resource type="BoxShape" id=2] +extents = Vector3( 0.312908, 1.16904, 0.82381 ) + +[sub_resource type="SphereShape" id=3] +radius = 0.108468 + +[sub_resource type="SpatialMaterial" id=1] +albedo_texture = ExtResource( 4 ) + +[node name="HumanLeg" instance=ExtResource( 1 )] +transform = Transform( 1, 8.74228e-08, -3.82137e-15, 0, -4.37114e-08, -1, -8.74228e-08, 1, -4.37114e-08, 0, 0, 0 ) +script = ExtResource( 2 ) + +[node name="PartCollider" parent="." index="0"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.77838, 0.0523456 ) +shape = SubResource( 2 ) + +[node name="TouchArea" parent="." index="1"] +transform = Transform( 1.97878, 4.49418e-13, -2.27374e-13, -6.82121e-13, -0.277472, -1.95923, 7.89663e-14, 1.95923, -0.277471, -6.25278e-13, -2.74829, -0.692869 ) + +[node name="CollisionShape" type="CollisionShape" parent="TouchArea" index="0"] +shape = SubResource( 3 ) + +[node name="Mesh" parent="." index="2" instance=ExtResource( 3 )] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.42109e-14, -2.28512, -0.0490953 ) + +[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, 0, 0, 1, -3.72529e-09, 0, 3.72529e-09, 1, 0, 0, 0 ) +material/0 = SubResource( 1 ) + +[node name="BoneAttachment" type="BoneAttachment" parent="Mesh/Armature/Skeleton" index="1"] +transform = Transform( 1, 2.27374e-13, -1.13687e-13, 3.41061e-13, 0.0910855, 0.995843, -5.68434e-14, -0.995843, 0.0910852, -3.3393e-13, 1.43368, 0.260799 ) +bone_name = "bone_2" + +[node name="RemoteTransform" type="RemoteTransform" parent="Mesh/Armature/Skeleton/BoneAttachment" index="0"] +remote_path = NodePath("../../../../../TouchArea") + +[editable path="Mesh"] 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"] diff --git a/project.godot b/project.godot index c6ecc5d..743f9c2 100644 --- a/project.godot +++ b/project.godot @@ -43,4 +43,5 @@ InGameState="*res://Global/InGameState.gd" [rendering] +quality/shadows/filter_mode=2 environment/default_environment="res://default_env.tres"