修改psl和jjtc模型的使用方式,模型——继承——复制交互节点(便于获取屏幕坐标)

This commit is contained in:
joylink_zhaoerwei 2024-05-14 15:13:29 +08:00
parent 36903b40b2
commit 8d012765ed
6 changed files with 106 additions and 16 deletions

View File

@ -22,8 +22,8 @@ driver/mix_rate.web=16000
[display] [display]
window/size/viewport_width=1600 window/size/viewport_width=1920
window/size/viewport_height=900 window/size/viewport_height=1080
window/size/initial_position_type=0 window/size/initial_position_type=0
window/stretch/mode="viewport" window/stretch/mode="viewport"

View File

@ -0,0 +1,5 @@
[gd_scene load_steps=2 format=3 uid="uid://cv15bojhrnfmk"]
[ext_resource type="PackedScene" uid="uid://b2b5du6g0swmc" path="res://Model/JJTC.blend" id="1_pf32c"]
[node name="JJTC" instance=ExtResource("1_pf32c")]

View File

@ -0,0 +1,5 @@
[gd_scene load_steps=2 format=3 uid="uid://digmg2jgbqlqb"]
[ext_resource type="PackedScene" uid="uid://sboj8u74lbum" path="res://Model/psl.blend" id="1_ky73y"]
[node name="psl" instance=ExtResource("1_ky73y")]

View File

@ -1,11 +1,49 @@
[gd_scene load_steps=6 format=3 uid="uid://c1rooma5e6ir4"] [gd_scene load_steps=8 format=3 uid="uid://c1rooma5e6ir4"]
[ext_resource type="Script" path="res://sceen/platform/jjtc.gd" id="1_ebk0j"] [ext_resource type="Script" path="res://sceen/platform/jjtc.gd" id="1_ebk0j"]
[ext_resource type="PackedScene" uid="uid://b2b5du6g0swmc" path="res://Model/JJTC.blend" id="2_hep0w"]
[ext_resource type="Script" path="res://sceen/platform/JJTC_Area3D.gd" id="3_j0a07"] [ext_resource type="Script" path="res://sceen/platform/JJTC_Area3D.gd" id="3_j0a07"]
[sub_resource type="BoxShape3D" id="BoxShape3D_7navh"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_hm7py"]
size = Vector3(0.07, 0.21, 0.09) resource_name = "20 - Default"
cull_mode = 2
albedo_color = Color(0.790731, 0.790731, 0.790731, 1)
metallic = 1.0
roughness = 0.858579
[sub_resource type="ArrayMesh" id="ArrayMesh_nqa4a"]
_surfaces = [{
"aabb": AABB(-0.0341152, -0.0976391, -0.0343226, 0.0682304, 0.195288, 0.0686552),
"format": 34896613377,
"index_count": 48,
"index_data": PackedByteArray(4, 0, 2, 0, 5, 0, 2, 0, 4, 0, 0, 0, 1, 0, 5, 0, 3, 0, 5, 0, 1, 0, 4, 0, 4, 0, 6, 0, 0, 0, 6, 0, 4, 0, 10, 0, 3, 0, 7, 0, 1, 0, 7, 0, 3, 0, 9, 0, 5, 0, 9, 0, 3, 0, 9, 0, 5, 0, 11, 0, 0, 0, 8, 0, 2, 0, 8, 0, 0, 0, 6, 0, 1, 0, 10, 0, 4, 0, 10, 0, 1, 0, 7, 0, 2, 0, 11, 0, 5, 0, 11, 0, 2, 0, 8, 0),
"name": "20 - Default",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 12,
"vertex_data": PackedByteArray(0, 0, 251, 255, 245, 255, 0, 0, 0, 0, 0, 0, 245, 255, 0, 0, 254, 255, 251, 255, 245, 255, 0, 0, 255, 255, 0, 0, 245, 255, 0, 0, 0, 0, 254, 127, 245, 255, 0, 0, 255, 255, 254, 127, 245, 255, 0, 0, 0, 0, 251, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 255, 251, 255, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 254, 127, 0, 0, 0, 0, 255, 255, 254, 127, 0, 0, 0, 0)
}]
blend_shape_mode = 0
[sub_resource type="ArrayMesh" id="ArrayMesh_1eifb"]
resource_name = "JJTC_网格_015"
_surfaces = [{
"aabb": AABB(-0.0341152, -0.0976391, -0.0343226, 0.0682304, 0.195288, 0.0686552),
"attribute_data": PackedByteArray(56, 79, 145, 8, 87, 54, 157, 13, 60, 81, 142, 8, 69, 83, 145, 8, 61, 71, 157, 13, 40, 83, 7, 10, 121, 79, 142, 8, 87, 54, 80, 4, 56, 79, 248, 9, 101, 81, 7, 10, 61, 71, 80, 4, 69, 83, 248, 9, 63, 81, 145, 8, 202, 62, 157, 13, 202, 62, 80, 4, 63, 81, 248, 9, 56, 79, 254, 9, 60, 81, 251, 9, 69, 83, 254, 9, 40, 83, 155, 8, 121, 79, 251, 9, 56, 79, 139, 8, 101, 81, 155, 8, 69, 83, 139, 8, 63, 81, 254, 9, 63, 81, 139, 8),
"format": 34896613399,
"index_count": 48,
"index_data": PackedByteArray(13, 0, 7, 0, 14, 0, 7, 0, 13, 0, 1, 0, 4, 0, 14, 0, 10, 0, 14, 0, 4, 0, 13, 0, 12, 0, 16, 0, 0, 0, 16, 0, 12, 0, 24, 0, 9, 0, 19, 0, 5, 0, 19, 0, 9, 0, 22, 0, 15, 0, 23, 0, 11, 0, 23, 0, 15, 0, 25, 0, 2, 0, 20, 0, 6, 0, 20, 0, 2, 0, 17, 0, 3, 0, 24, 0, 12, 0, 24, 0, 3, 0, 18, 0, 8, 0, 25, 0, 15, 0, 25, 0, 8, 0, 21, 0),
"material": SubResource("StandardMaterial3D_hm7py"),
"name": "20 - Default",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 26,
"vertex_data": PackedByteArray(0, 0, 251, 255, 245, 255, 84, 213, 0, 0, 251, 255, 245, 255, 115, 209, 0, 0, 251, 255, 245, 255, 255, 255, 0, 0, 0, 0, 245, 255, 84, 213, 0, 0, 0, 0, 245, 255, 74, 192, 0, 0, 0, 0, 245, 255, 255, 255, 254, 255, 251, 255, 245, 255, 255, 255, 254, 255, 251, 255, 245, 255, 74, 192, 254, 255, 251, 255, 245, 255, 84, 213, 255, 255, 0, 0, 245, 255, 255, 255, 255, 255, 0, 0, 245, 255, 115, 209, 255, 255, 0, 0, 245, 255, 84, 213, 0, 0, 254, 127, 245, 255, 84, 213, 0, 0, 254, 127, 245, 255, 252, 197, 255, 255, 254, 127, 245, 255, 252, 197, 255, 255, 254, 127, 245, 255, 84, 213, 0, 0, 251, 255, 0, 0, 84, 213, 0, 0, 251, 255, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 84, 213, 0, 0, 0, 0, 0, 0, 255, 255, 254, 255, 251, 255, 0, 0, 255, 255, 254, 255, 251, 255, 0, 0, 84, 213, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 84, 213, 0, 0, 254, 127, 0, 0, 84, 213, 255, 255, 254, 127, 0, 0, 84, 213, 84, 85, 170, 170, 180, 121, 205, 175, 255, 127, 255, 191, 84, 85, 170, 170, 198, 72, 69, 135, 255, 127, 255, 63, 255, 127, 255, 191, 56, 183, 185, 120, 170, 170, 84, 85, 255, 127, 255, 63, 74, 134, 49, 80, 170, 170, 84, 85, 84, 85, 170, 170, 0, 99, 254, 156, 254, 156, 0, 99, 170, 170, 84, 85, 84, 85, 170, 170, 255, 127, 255, 191, 84, 85, 170, 170, 255, 127, 255, 63, 255, 127, 255, 191, 170, 170, 84, 85, 255, 127, 255, 63, 170, 170, 84, 85, 84, 85, 170, 170, 170, 170, 84, 85)
}]
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_nqa4a")
[sub_resource type="BoxShape3D" id="BoxShape3D_fbwyd"]
size = Vector3(0.0792694, 0.194519, 0.132751)
[sub_resource type="ViewportTexture" id="ViewportTexture_gubnu"] [sub_resource type="ViewportTexture" id="ViewportTexture_gubnu"]
viewport_path = NodePath("SubViewport") viewport_path = NodePath("SubViewport")
@ -13,15 +51,17 @@ viewport_path = NodePath("SubViewport")
[node name="JJTC" type="Node3D"] [node name="JJTC" type="Node3D"]
script = ExtResource("1_ebk0j") script = ExtResource("1_ebk0j")
[node name="JJTC_Body" parent="." instance=ExtResource("2_hep0w")] [node name="JJTC_Body" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1.66, 0, 0, 0, 1, 5.73, -0.67, -9.14) transform = Transform3D(1, 0, 0, 0, 1.8, 0, 0, 0, 1, -9.47739, 1.07247, 1.73642)
mesh = SubResource("ArrayMesh_1eifb")
skeleton = NodePath("")
[node name="JJTC_Area3D" type="Area3D" parent="JJTC_Body"] [node name="JJTC_Area3D" type="Area3D" parent="JJTC_Body"]
script = ExtResource("3_j0a07") script = ExtResource("3_j0a07")
[node name="CollisionShape3D" type="CollisionShape3D" parent="JJTC_Body/JJTC_Area3D"] [node name="CollisionShape3D" type="CollisionShape3D" parent="JJTC_Body/JJTC_Area3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9.478, 1.055, 1.74) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0001297, 0.00211501, -0.00491333)
shape = SubResource("BoxShape3D_7navh") shape = SubResource("BoxShape3D_fbwyd")
[node name="SubViewport" type="SubViewport" parent="."] [node name="SubViewport" type="SubViewport" parent="."]
size = Vector2i(55, 265) size = Vector2i(55, 265)
@ -45,7 +85,7 @@ horizontal_alignment = 1
vertical_alignment = 1 vertical_alignment = 1
[node name="Sprite3D" type="Sprite3D" parent="."] [node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(0.128, 0, 0, 0, 0.128, 0, 0, 0, 0.128, -3.75, 1.075, -7.36) transform = Transform3D(0.128, 0, 0, 0, 0.128, 0, 0, 0, 0.128, -9.477, 1.07595, 1.77447)
texture = SubResource("ViewportTexture_gubnu") texture = SubResource("ViewportTexture_gubnu")
[connection signal="input_event" from="JJTC_Body/JJTC_Area3D" to="JJTC_Body/JJTC_Area3D" method="_on_input_event"] [connection signal="input_event" from="JJTC_Body/JJTC_Area3D" to="JJTC_Body/JJTC_Area3D" method="_on_input_event"]

View File

@ -18,7 +18,6 @@ script = ExtResource("1_kerxo")
[node name="PSL" parent="." instance=ExtResource("2_wj0sf")] [node name="PSL" parent="." instance=ExtResource("2_wj0sf")]
[node name="JJTC" parent="." instance=ExtResource("3_rpfjx")] [node name="JJTC" parent="." instance=ExtResource("3_rpfjx")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.6, 0.1, 9.2)
[node name="LCB" parent="." instance=ExtResource("3_f0qkt")] [node name="LCB" parent="." instance=ExtResource("3_f0qkt")]
position = Vector2i(518, 324) position = Vector2i(518, 324)

View File

@ -1,8 +1,46 @@
[gd_scene load_steps=6 format=3 uid="uid://d0lqunjq25ro8"] [gd_scene load_steps=8 format=3 uid="uid://d0lqunjq25ro8"]
[ext_resource type="Script" path="res://sceen/platform/PSL_Area3D.gd" id="1_5mk24"] [ext_resource type="Script" path="res://sceen/platform/PSL_Area3D.gd" id="1_5mk24"]
[ext_resource type="Script" path="res://sceen/platform/psl.gd" id="1_fwlhs"] [ext_resource type="Script" path="res://sceen/platform/psl.gd" id="1_fwlhs"]
[ext_resource type="PackedScene" uid="uid://sboj8u74lbum" path="res://Model/psl.blend" id="3_4k1s7"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_d1nsf"]
resource_name = "20 - Default"
cull_mode = 2
albedo_color = Color(0.790731, 0.790731, 0.790731, 1)
metallic = 1.0
roughness = 0.858579
[sub_resource type="ArrayMesh" id="ArrayMesh_jh3l6"]
_surfaces = [{
"aabb": AABB(-0.101208, -0.0440127, -0.0355776, 0.202415, 0.0880253, 0.0711652),
"format": 34896613377,
"index_count": 48,
"index_data": PackedByteArray(4, 0, 2, 0, 5, 0, 2, 0, 4, 0, 0, 0, 1, 0, 5, 0, 3, 0, 5, 0, 1, 0, 4, 0, 4, 0, 6, 0, 0, 0, 6, 0, 4, 0, 10, 0, 3, 0, 7, 0, 1, 0, 7, 0, 3, 0, 9, 0, 5, 0, 9, 0, 3, 0, 9, 0, 5, 0, 11, 0, 0, 0, 8, 0, 2, 0, 8, 0, 0, 0, 6, 0, 1, 0, 10, 0, 4, 0, 10, 0, 1, 0, 7, 0, 2, 0, 11, 0, 5, 0, 11, 0, 2, 0, 8, 0),
"name": "20 - Default",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 12,
"vertex_data": PackedByteArray(0, 0, 0, 0, 245, 255, 0, 0, 255, 255, 0, 0, 245, 255, 0, 0, 0, 0, 255, 255, 245, 255, 0, 0, 255, 255, 255, 255, 245, 255, 0, 0, 255, 127, 0, 0, 245, 255, 0, 0, 255, 127, 255, 255, 245, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 255, 127, 0, 0, 0, 0, 0, 0, 255, 127, 255, 255, 0, 0, 0, 0)
}]
blend_shape_mode = 0
[sub_resource type="ArrayMesh" id="ArrayMesh_um7vb"]
resource_name = "psl_网格_014"
_surfaces = [{
"aabb": AABB(-0.101208, -0.0440127, -0.0355776, 0.202415, 0.0880253, 0.0711652),
"attribute_data": PackedByteArray(56, 44, 1, 29, 8, 1, 194, 41, 247, 39, 7, 29, 133, 48, 7, 29, 187, 36, 194, 41, 72, 48, 29, 32, 127, 40, 1, 29, 8, 1, 29, 22, 247, 39, 252, 31, 133, 48, 252, 31, 187, 36, 29, 22, 143, 44, 29, 32, 62, 44, 7, 29, 225, 18, 194, 41, 225, 18, 29, 22, 62, 44, 252, 31, 56, 44, 2, 32, 247, 39, 8, 32, 133, 48, 8, 32, 72, 48, 27, 29, 127, 40, 2, 32, 247, 39, 251, 28, 133, 48, 251, 28, 143, 44, 27, 29, 62, 44, 8, 32, 62, 44, 251, 28),
"format": 34896613399,
"index_count": 48,
"index_data": PackedByteArray(13, 0, 7, 0, 14, 0, 7, 0, 13, 0, 1, 0, 4, 0, 14, 0, 10, 0, 14, 0, 4, 0, 13, 0, 12, 0, 17, 0, 2, 0, 17, 0, 12, 0, 24, 0, 11, 0, 19, 0, 5, 0, 19, 0, 11, 0, 23, 0, 15, 0, 22, 0, 9, 0, 22, 0, 15, 0, 25, 0, 0, 0, 20, 0, 6, 0, 20, 0, 0, 0, 16, 0, 3, 0, 24, 0, 12, 0, 24, 0, 3, 0, 18, 0, 8, 0, 25, 0, 15, 0, 25, 0, 8, 0, 21, 0),
"material": SubResource("StandardMaterial3D_d1nsf"),
"name": "20 - Default",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 26,
"vertex_data": PackedByteArray(0, 0, 0, 0, 245, 255, 84, 213, 0, 0, 0, 0, 245, 255, 62, 168, 0, 0, 0, 0, 245, 255, 255, 191, 255, 255, 0, 0, 245, 255, 255, 191, 255, 255, 0, 0, 245, 255, 62, 168, 255, 255, 0, 0, 245, 255, 84, 213, 0, 0, 255, 255, 245, 255, 84, 213, 0, 0, 255, 255, 245, 255, 62, 168, 0, 0, 255, 255, 245, 255, 255, 191, 255, 255, 255, 255, 245, 255, 255, 191, 255, 255, 255, 255, 245, 255, 62, 168, 255, 255, 255, 255, 245, 255, 84, 213, 255, 127, 0, 0, 245, 255, 255, 191, 255, 127, 0, 0, 245, 255, 255, 159, 255, 127, 255, 255, 245, 255, 255, 159, 255, 127, 255, 255, 245, 255, 255, 191, 0, 0, 0, 0, 0, 0, 84, 213, 0, 0, 0, 0, 0, 0, 255, 191, 255, 255, 0, 0, 0, 0, 255, 191, 255, 255, 0, 0, 0, 0, 84, 213, 0, 0, 255, 255, 0, 0, 84, 213, 0, 0, 255, 255, 0, 0, 255, 191, 255, 255, 255, 255, 0, 0, 255, 191, 255, 255, 255, 255, 0, 0, 84, 213, 255, 127, 0, 0, 0, 0, 255, 191, 255, 127, 255, 255, 0, 0, 255, 191, 84, 85, 170, 170, 156, 66, 25, 175, 0, 0, 255, 127, 0, 0, 255, 127, 26, 47, 98, 61, 170, 170, 84, 85, 84, 85, 170, 170, 228, 208, 156, 194, 255, 255, 255, 127, 255, 255, 255, 127, 98, 189, 229, 80, 170, 170, 84, 85, 0, 0, 255, 127, 0, 0, 255, 127, 255, 255, 255, 127, 255, 255, 255, 127, 84, 85, 170, 170, 0, 0, 255, 127, 0, 0, 255, 127, 170, 170, 84, 85, 84, 85, 170, 170, 255, 255, 255, 127, 255, 255, 255, 127, 170, 170, 84, 85, 0, 0, 255, 127, 255, 255, 255, 127)
}]
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_jh3l6")
[sub_resource type="BoxShape3D" id="BoxShape3D_lh1kl"] [sub_resource type="BoxShape3D" id="BoxShape3D_lh1kl"]
size = Vector3(0.224365, 0.0963135, 0.103912) size = Vector3(0.224365, 0.0963135, 0.103912)
@ -13,10 +51,13 @@ viewport_path = NodePath("SubViewport")
[node name="PSL" type="Node3D"] [node name="PSL" type="Node3D"]
script = ExtResource("1_fwlhs") script = ExtResource("1_fwlhs")
[node name="PSL_body" parent="." instance=ExtResource("3_4k1s7")] [node name="PSL_body" type="MeshInstance3D" parent="."]
metadata/_edit_lock_ = true transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9.41122, 2.3794, 1.74457)
mesh = SubResource("ArrayMesh_um7vb")
skeleton = NodePath("")
[node name="PSL_Area3D" type="Area3D" parent="PSL_body"] [node name="PSL_Area3D" type="Area3D" parent="PSL_body"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9.41122, -2.3794, -1.74457)
script = ExtResource("1_5mk24") script = ExtResource("1_5mk24")
[node name="CollisionShape3D" type="CollisionShape3D" parent="PSL_body/PSL_Area3D"] [node name="CollisionShape3D" type="CollisionShape3D" parent="PSL_body/PSL_Area3D"]