diff --git a/3D Input/huhntextur.png b/3D Input/huhntextur.png new file mode 100644 index 0000000..de6caaa Binary files /dev/null and b/3D Input/huhntextur.png differ diff --git a/3D Input/hühnchen kopf unwrapped.blend b/3D Input/hühnchen kopf unwrapped.blend index e97d623..1c319d4 100644 Binary files a/3D Input/hühnchen kopf unwrapped.blend and b/3D Input/hühnchen kopf unwrapped.blend differ diff --git a/3D Input/hühnchen kopf unwrapped.blend1 b/3D Input/hühnchen kopf unwrapped.blend1 index 336d4dc..59040dc 100644 Binary files a/3D Input/hühnchen kopf unwrapped.blend1 and b/3D Input/hühnchen kopf unwrapped.blend1 differ diff --git a/3D Input/hühnchen kopf.blend b/3D Input/hühnchen kopf.blend index 063182d..27373bd 100644 Binary files a/3D Input/hühnchen kopf.blend and b/3D Input/hühnchen kopf.blend differ diff --git a/3D Input/hühnchen kopf.blend1 b/3D Input/hühnchen kopf.blend1 index add4805..77fc549 100644 Binary files a/3D Input/hühnchen kopf.blend1 and b/3D Input/hühnchen kopf.blend1 differ diff --git a/BodyParts/BodyBase/BodyBase.gd b/BodyParts/BodyBase/BodyBase.gd index 42bfcb2..3f4df9b 100644 --- a/BodyParts/BodyBase/BodyBase.gd +++ b/BodyParts/BodyBase/BodyBase.gd @@ -22,9 +22,14 @@ func _physics_process(delta): for body in get_colliding_bodies(): if body.name == "StaticBody": - if current_angle > 0.3: + if current_angle > 0.3: apply_torque_impulse(rot_vector * current_angle * 7) + apply_impulse(transform.basis.xform(Vector3.ZERO), -(transform.basis.y) * 0.05) elif current_angle > 0.05: - apply_torque_impulse(-(rot_vector * current_angle * 20)) + apply_torque_impulse(-(rot_vector * current_angle * 5)) else: angular_velocity = Vector3.ZERO + + for axis in angular_velocity: + if axis > 10: + axis -= axis * 0.75 diff --git a/BodyParts/FrogLeg.tscn b/BodyParts/FrogLeg.tscn index 10193db..ef0c45a 100644 --- a/BodyParts/FrogLeg.tscn +++ b/BodyParts/FrogLeg.tscn @@ -1,13 +1,12 @@ -[gd_scene load_steps=9 format=2] +[gd_scene load_steps=8 format=2] [ext_resource path="res://BodyParts/PushingBodyPart.tscn" type="PackedScene" id=1] [ext_resource path="res://BodyParts/FrogLeg.gd" type="Script" id=2] [ext_resource path="res://3D Input/Fertige GLBs/Bein_Frosch.glb" type="PackedScene" id=3] [ext_resource path="res://3D Input/froschtexture.png" type="Texture" id=4] -[ext_resource path="res://Audio/frog_sound.wav" type="AudioStream" id=5] [sub_resource type="BoxShape" id=1] -extents = Vector3( 0.649825, 2.07811, 1.64282 ) +extents = Vector3( 0.666, 2.41488, 1.57924 ) [sub_resource type="SphereShape" id=2] radius = 0.115004 @@ -17,16 +16,16 @@ albedo_texture = ExtResource( 4 ) roughness = 0.3 [node name="FrogLeg" instance=ExtResource( 1 )] -transform = Transform( -1, 8.74228e-08, 0, -8.74228e-08, -1, 0, 0, 0, 1, 0, 0, 0 ) +transform = Transform( -1, 8.74228e-08, 0, -8.48803e-08, -0.970917, 0.239415, 2.09303e-08, 0.239415, 0.970917, 0, 0, 0 ) script = ExtResource( 2 ) cost = 30.0 [node name="PartCollider" parent="." index="0"] -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.21377, -0.911304, -3.94992 ) +transform = Transform( 1, -6.77822e-08, -8.51879e-08, -6.77823e-08, 0.224662, -0.974437, 8.5188e-08, 0.974437, 0.224662, 1.61495e-07, -1.52524, -2.85154 ) shape = SubResource( 1 ) [node name="TouchArea" parent="." index="1"] -transform = Transform( 2.20191, -0.624093, -2.57245, 1.26297, 3.18837, 0.307522, 2.32635, -1.14024, 2.26789, 0.307056, -2.38919, -4.91366 ) +transform = Transform( 2.20191, -0.624093, -2.57245, 1.26297, 3.18838, 0.307522, 2.32635, -1.14024, 2.26789, 0.307056, -2.38919, -4.91366 ) [node name="CollisionShape" type="CollisionShape" parent="TouchArea" index="0"] shape = SubResource( 2 ) @@ -34,8 +33,11 @@ shape = SubResource( 2 ) [node name="Mesh" parent="." index="2" instance=ExtResource( 3 )] transform = Transform( -1.13133e-08, 4.2222e-08, 1, 0.965926, 0.258819, 0, -0.258819, 0.965926, -4.37114e-08, 0.734499, -2.94707, -2.68774 ) +[node name="Skeleton" parent="Mesh/Armature" index="0"] +bones/3/bound_children = [ NodePath("BoneAttachment") ] + [node name="froschbein" parent="Mesh/Armature/Skeleton" index="0"] -transform = Transform( 1, -1.49012e-08, 0, 0, 1, -5.96046e-08, 0, 2.98023e-08, 1, 0, 0, 0 ) +transform = Transform( 1, -1.11759e-08, 0, 1.86265e-09, 1, -5.96046e-08, 1.86265e-09, 0, 1, 0, 0, 0 ) material/0 = SubResource( 3 ) [node name="BoneAttachment" type="BoneAttachment" parent="Mesh/Armature/Skeleton" index="1"] @@ -48,8 +50,9 @@ remote_path = NodePath("../../../../../TouchArea") [node name="AnimationPlayer" parent="Mesh" index="2"] playback_speed = 2.0 -[node name="ActionSound" parent="." index="3"] -stream = ExtResource( 5 ) -unit_db = 0.0 +[node name="CollisionPolygon" type="CollisionPolygon" parent="." index="3"] +__meta__ = { +"_edit_group_": true +} [editable path="Mesh"] diff --git a/BodyParts/HumanLeg.tscn b/BodyParts/HumanLeg.tscn index 79c5193..a3a9279 100644 --- a/BodyParts/HumanLeg.tscn +++ b/BodyParts/HumanLeg.tscn @@ -7,7 +7,7 @@ [ext_resource path="res://Audio/punch_sound.wav" type="AudioStream" id=5] [sub_resource type="BoxShape" id=1] -extents = Vector3( 0.666, 2.41488, 1.555 ) +extents = Vector3( 0.666, 2.5097, 1.57924 ) [sub_resource type="SphereShape" id=2] radius = 0.108468 diff --git a/UI/MainMenu.gd b/UI/MainMenu.gd index 89daa78..e2ef91d 100644 --- a/UI/MainMenu.gd +++ b/UI/MainMenu.gd @@ -1,8 +1,9 @@ -extends Control +extends Spatial export(NodePath) var startPath var _start_button +onready var viewport = get_node("ViewportContainer/Viewport") signal body_build() diff --git a/UI/MainMenu.tscn b/UI/MainMenu.tscn index ad2f084..9078636 100644 --- a/UI/MainMenu.tscn +++ b/UI/MainMenu.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=8 format=2] [ext_resource path="res://UI/MainMenu.gd" type="Script" id=1] [ext_resource path="res://Resources/Fonts/MenuHeader.tres" type="DynamicFont" id=2] @@ -6,15 +6,40 @@ [ext_resource path="res://Resources/Styles/ButtonHoverStyle.tres" type="StyleBox" id=4] [ext_resource path="res://Resources/Styles/ButtonPressedStyle.tres" type="StyleBox" id=5] [ext_resource path="res://Resources/Styles/ButtonNormalStyle.tres" type="StyleBox" id=6] +[ext_resource path="res://Ingame/Arena.tscn" type="PackedScene" id=7] -[node name="MainMenu" type="Control"] +[node name="MainMenu" type="Spatial"] +script = ExtResource( 1 ) +startPath = NodePath("MarginContainer2/VBoxContainer/Start") + +[node name="View" type="MarginContainer" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 -script = ExtResource( 1 ) +size_flags_horizontal = 3 +size_flags_vertical = 3 __meta__ = { "_edit_use_anchors_": false } -startPath = NodePath("MarginContainer2/VBoxContainer/Start") + +[node name="ViewportContainer" type="ViewportContainer" parent="View"] +margin_right = 1024.0 +margin_bottom = 600.0 +rect_min_size = Vector2( 200, 40 ) +size_flags_horizontal = 3 +size_flags_vertical = 3 +stretch = true +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Viewport" type="Viewport" parent="View/ViewportContainer"] +size = Vector2( 1024, 600 ) +handle_input_locally = false +render_target_update_mode = 3 + +[node name="Camera" type="Camera" parent="View/ViewportContainer/Viewport"] +transform = Transform( -1.62921e-07, -0.604599, 0.79653, 0, 0.79653, 0.604599, -1, 9.85017e-08, -1.29771e-07, 30, 25, 0 ) +fov = 63.748 [node name="MarginContainer" type="MarginContainer" parent="."] anchor_left = 0.5 @@ -32,6 +57,8 @@ __meta__ = { [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] margin_right = 1024.0 margin_bottom = 600.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 [node name="GameName" type="Label" parent="MarginContainer/VBoxContainer"] margin_right = 1024.0 @@ -40,7 +67,8 @@ rect_min_size = Vector2( 0, 250 ) size_flags_horizontal = 3 size_flags_vertical = 3 custom_fonts/font = ExtResource( 2 ) -text = "D-d-d-d-d-duell" +text = "Body-Part-Fight-Repair- +Impker-Arena-Madness" align = 1 valign = 2 @@ -116,5 +144,7 @@ rect_min_size = Vector2( 0, 35 ) __meta__ = { "_edit_use_anchors_": false } + +[node name="Arena" parent="." instance=ExtResource( 7 )] [connection signal="pressed" from="MarginContainer2/VBoxContainer/Start" to="." method="_on_Start_pressed"] [connection signal="pressed" from="MarginContainer2/VBoxContainer/Exit" to="." method="_on_Exit_pressed"]