mittagessen kommt immer naher

This commit is contained in:
Ententerminator 2020-02-01 13:44:14 +01:00
parent 3ef7ffd031
commit 81f5b9d15a
8 changed files with 89 additions and 10 deletions

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Stierbg.jpg-b439c056e778b8fb16ae62aa15547147.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://3D Input/Stierbg.jpg"
dest_files=[ "res://.import/Stierbg.jpg-b439c056e778b8fb16ae62aa15547147.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
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
svg/scale=1.0

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/horselegimg.jpg-8935d9a9effef767d66fb9866f38d2c4.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://3D Input/horselegimg.jpg"
dest_files=[ "res://.import/horselegimg.jpg-8935d9a9effef767d66fb9866f38d2c4.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
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
svg/scale=1.0

View File

@ -5,9 +5,10 @@ extends VBoxContainer
func _ready(): func _ready():
for entry in BodyPartLoader.bodyparts: for entry in BodyPartLoader.bodyparts:
var button = Button.new() var button = Button.new()
button.text = entry.key button.text = entry
add_child(button)
button.connect("pressed", get_parent().get_parent().get_parent(), "body_part_chosen", [button.text])
# Called every frame. 'delta' is the elapsed time since the previous frame. func button_pressed(params):
#func _process(delta): emit_signal("choose_bodypart", params[0])
# pass

View File

@ -47,7 +47,7 @@ handle_input_locally = false
render_target_update_mode = 3 render_target_update_mode = 3
[node name="Camera" type="Camera" parent="GUI/HBoxC/ViewportContainer/Viewport"] [node name="Camera" type="Camera" parent="GUI/HBoxC/ViewportContainer/Viewport"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 3 ) transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 4.16872 )
[node name="MouseLook" type="RayCast" parent="GUI/HBoxC/ViewportContainer/Viewport"] [node name="MouseLook" type="RayCast" parent="GUI/HBoxC/ViewportContainer/Viewport"]
enabled = true enabled = true
@ -55,3 +55,5 @@ collide_with_areas = true
collide_with_bodies = false collide_with_bodies = false
[node name="Torso" parent="." instance=ExtResource( 1 )] [node name="Torso" parent="." instance=ExtResource( 1 )]
[editable path="Torso"]

View File

@ -18,6 +18,7 @@ var _viewport : Viewport
var _velx = 0 var _velx = 0
var _vely = 0 var _vely = 0
var _attachment_point : Spatial
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
@ -66,6 +67,7 @@ func _physics_process(delta):
if _rayCast.is_colliding(): if _rayCast.is_colliding():
# collider will be the node hit # collider will be the node hit
_attachment_point = _rayCast.get_collider().get_parent()
print(_rayCast.get_collider()) print(_rayCast.get_collider())
@ -79,4 +81,7 @@ func _input(event):
else: else:
print("mouse unpressed at: ", event.position) print("mouse unpressed at: ", event.position)
_viewRot = false _viewRot = false
func body_part_chosen(params):
_attachment_point.add_child(BodyPartLoader.bodyparts[params].instance())

View File

@ -4,7 +4,6 @@
[ext_resource path="res://3D Input/untitled.glb" type="PackedScene" id=2] [ext_resource path="res://3D Input/untitled.glb" type="PackedScene" id=2]
[ext_resource path="res://BodyParts/Arm.gd" type="Script" id=3] [ext_resource path="res://BodyParts/Arm.gd" type="Script" id=3]
[sub_resource type="SphereShape" id=1] [sub_resource type="SphereShape" id=1]
[sub_resource type="SphereShape" id=2] [sub_resource type="SphereShape" id=2]
@ -20,14 +19,14 @@ shape = SubResource( 1 )
[node name="Mesh" parent="." index="1" instance=ExtResource( 2 )] [node name="Mesh" parent="." index="1" instance=ExtResource( 2 )]
[node name="BoneAttachment" type="BoneAttachment" parent="Mesh/Armature/Skeleton" index="1"] [node name="BoneAttachment" type="BoneAttachment" parent="Mesh/Armature/Skeleton" index="1"]
transform = Transform( 1, -1.98292e-23, -3.18966e-24, 6.71348e-24, -9.49949e-08, 1, -2.07636e-23, -1, -9.49949e-08, -2.23781e-16, -0.0078205, -5.05441 ) transform = Transform( 1, -1.98247e-23, -2.98292e-24, 6.50669e-24, -9.49949e-08, 1, -2.07684e-23, -1, -9.49949e-08, -2.23781e-16, -0.0078205, -5.05441 )
bone_name = "bone_2" bone_name = "bone_2"
[node name="RemoteTransform" type="RemoteTransform" parent="Mesh/Armature/Skeleton/BoneAttachment" index="0"] [node name="RemoteTransform" type="RemoteTransform" parent="Mesh/Armature/Skeleton/BoneAttachment" index="0"]
remote_path = NodePath("../../../../../TouchArea") remote_path = NodePath("../../../../../TouchArea")
[node name="TouchArea" parent="." index="2"] [node name="TouchArea" parent="." index="2"]
transform = Transform( 1, -1.98292e-23, -3.18966e-24, 6.71348e-24, -9.49949e-08, 1, -2.07636e-23, -1, -9.49949e-08, -2.23781e-16, -0.0078205, -7.60024 ) transform = Transform( 1, -1.98247e-23, -2.98292e-24, 6.50669e-24, -9.49949e-08, 1, -2.07684e-23, -1, -9.49949e-08, -2.23781e-16, -0.0078205, -7.60024 )
[node name="CollisionShape" type="CollisionShape" parent="TouchArea" index="0"] [node name="CollisionShape" type="CollisionShape" parent="TouchArea" index="0"]
transform = Transform( 1, 2.98291e-24, -1.98247e-23, -2.07684e-23, -9.49949e-08, -1, -6.50669e-24, 1, -9.49949e-08, 2.23781e-16, 0.399765, 0.00782054 ) transform = Transform( 1, 2.98291e-24, -1.98247e-23, -2.07684e-23, -9.49949e-08, -1, -6.50669e-24, 1, -9.49949e-08, 2.23781e-16, 0.399765, 0.00782054 )

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=2] [gd_scene load_steps=8 format=2]
[ext_resource path="res://BodyParts/BodyBase/BodyBase.gd" type="Script" id=1] [ext_resource path="res://BodyParts/BodyBase/BodyBase.gd" type="Script" id=1]
@ -8,6 +8,8 @@
[sub_resource type="SphereMesh" id=3] [sub_resource type="SphereMesh" id=3]
[sub_resource type="GDScript" id=6]
[sub_resource type="SphereShape" id=4] [sub_resource type="SphereShape" id=4]
[sub_resource type="SphereShape" id=5] [sub_resource type="SphereShape" id=5]
@ -32,6 +34,7 @@ mesh = SubResource( 3 )
material/0 = null material/0 = null
[node name="Area" type="Area" parent="FrontLeft"] [node name="Area" type="Area" parent="FrontLeft"]
script = SubResource( 6 )
[node name="CollisionShape" type="CollisionShape" parent="FrontLeft/Area"] [node name="CollisionShape" type="CollisionShape" parent="FrontLeft/Area"]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0 ) transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0 )

View File

@ -5,3 +5,4 @@ var bodyparts : Dictionary
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready(): func _ready():
bodyparts["Arm"] = load("res://BodyParts/Arm.tscn") bodyparts["Arm"] = load("res://BodyParts/Arm.tscn")