cleand file structure & rework of playermodel

This commit is contained in:
leca 2024-02-29 15:21:37 +03:00
parent 95eedf8134
commit 2142fbf55a
20 changed files with 125 additions and 1119 deletions

Binary file not shown.

View File

@ -1,34 +0,0 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://coa22cxx7aoe1"
path="res://.godot/imported/buddy.glb-6b88d2f9ceb79cd70c33a24352eb18ce.scn"
[deps]
source_file="res://models/buddy.glb"
dest_files=["res://.godot/imported/buddy.glb-6b88d2f9ceb79cd70c33a24352eb18ce.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1010 KiB

View File

@ -1,36 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dirdtjfuc7ibi"
path.s3tc="res://.godot/imported/buddy_1613124237_95-p-fon-kozha-zheltaya-205.jpg-85dd45775a662112c983877a89c4d254.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
[deps]
source_file="res://models/buddy_1613124237_95-p-fon-kozha-zheltaya-205.jpg"
dest_files=["res://.godot/imported/buddy_1613124237_95-p-fon-kozha-zheltaya-205.jpg-85dd45775a662112c983877a89c4d254.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

View File

@ -1,140 +0,0 @@
[gd_scene load_steps=10 format=3 uid="uid://b2jhgtduapovl"]
[ext_resource type="Script" path="res://scripts/Player.gd" id="1_o6o4b"]
[ext_resource type="PackedScene" uid="uid://cnu1vf8k5i3tv" path="res://scenes/models/pistol.tscn" id="2_nxbij"]
[ext_resource type="PackedScene" uid="uid://caos4gg5cd6f6" path="res://scenes/models/ak_47.tscn" id="3_r56e3"]
[ext_resource type="ArrayMesh" uid="uid://p2wom3t07fio" path="res://models/player.obj" id="6_lfqxv"]
[ext_resource type="Material" uid="uid://btj7xxav4d6l0" path="res://textures/materials/orange.res" id="6_md2fv"]
[ext_resource type="Material" uid="uid://ojceh78w7jp0" path="res://textures/materials/black90%.res" id="7_2k5kn"]
[ext_resource type="ArrayMesh" uid="uid://dpdsmpuycacsx" path="res://models/playerv2.obj" id="7_jg2rj"]
[sub_resource type="SphereMesh" id="SphereMesh_fp0bl"]
[sub_resource type="BoxShape3D" id="BoxShape3D_gsdrn"]
size = Vector3(1.44899, 0.8463, 0.132389)
[node name="player" type="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.10113, 0)
[node name="CharacterBody3D" type="CharacterBody3D" parent="."]
script = ExtResource("1_o6o4b")
[node name="Head" type="Node3D" parent="CharacterBody3D"]
[node name="Camera" type="Camera3D" parent="CharacterBody3D/Head"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.00527, 0)
fov = 90.0
[node name="viewRaycast" type="RayCast3D" parent="CharacterBody3D/Head/Camera"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0123241, -0.315944)
target_position = Vector3(0, 0, -100)
[node name="Hand" type="Node3D" parent="CharacterBody3D/Head/Camera"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0.72454, -0.463491, -0.808041)
[node name="knife" type="MeshInstance3D" parent="CharacterBody3D/Head/Camera/Hand"]
transform = Transform3D(0.16, 0, 0, 0, 0.16, 0, 0, 0, 0.16, -0.158471, 0.140001, 0.229943)
mesh = SubResource("SphereMesh_fp0bl")
[node name="raycast" type="RayCast3D" parent="CharacterBody3D/Head/Camera/Hand/knife"]
[node name="pistol" parent="CharacterBody3D/Head/Camera/Hand" instance=ExtResource("2_nxbij")]
transform = Transform3D(1, 0, -3.55271e-15, 0, 1, 0, 3.55271e-15, 0, 1, 2.38419e-07, -0.0344509, 0.118615)
[node name="ak-47" parent="CharacterBody3D/Head/Camera/Hand" instance=ExtResource("3_r56e3")]
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, -0.30437, -0.235472, 0.183832)
[node name="Nickname" type="Label3D" parent="CharacterBody3D/Head"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.2111, 0.097512)
billboard = 1
text = "Unnamed"
[node name="Player" type="MeshInstance3D" parent="CharacterBody3D/Head"]
transform = Transform3D(0.7, 0, 0, 0, 0.7, 0, 0, 0, 0.7, -0.00798726, -1.10113, 0.132147)
visible = false
cast_shadow = 0
mesh = ExtResource("6_lfqxv")
skeleton = NodePath("../../..")
surface_material_override/0 = ExtResource("6_md2fv")
surface_material_override/1 = ExtResource("6_md2fv")
surface_material_override/2 = ExtResource("7_2k5kn")
surface_material_override/3 = ExtResource("7_2k5kn")
surface_material_override/4 = ExtResource("6_md2fv")
surface_material_override/5 = ExtResource("6_md2fv")
surface_material_override/6 = ExtResource("7_2k5kn")
surface_material_override/7 = ExtResource("7_2k5kn")
surface_material_override/8 = ExtResource("6_md2fv")
surface_material_override/9 = ExtResource("6_md2fv")
surface_material_override/10 = ExtResource("6_md2fv")
surface_material_override/11 = ExtResource("7_2k5kn")
surface_material_override/12 = ExtResource("7_2k5kn")
surface_material_override/13 = ExtResource("6_md2fv")
surface_material_override/14 = ExtResource("7_2k5kn")
surface_material_override/15 = ExtResource("7_2k5kn")
surface_material_override/16 = ExtResource("6_md2fv")
surface_material_override/17 = ExtResource("6_md2fv")
surface_material_override/18 = ExtResource("7_2k5kn")
surface_material_override/19 = ExtResource("7_2k5kn")
surface_material_override/20 = ExtResource("6_md2fv")
surface_material_override/21 = ExtResource("6_md2fv")
surface_material_override/22 = ExtResource("6_md2fv")
surface_material_override/23 = ExtResource("6_md2fv")
surface_material_override/24 = ExtResource("7_2k5kn")
surface_material_override/25 = ExtResource("7_2k5kn")
surface_material_override/26 = ExtResource("7_2k5kn")
surface_material_override/27 = ExtResource("6_md2fv")
surface_material_override/28 = ExtResource("7_2k5kn")
[node name="collisionhead" type="CollisionShape3D" parent="CharacterBody3D"]
transform = Transform3D(0.249323, 0, 0, 0, 0.447434, 0, 0, 0, 3.00119, -0.00773959, 0.986574, 0.0914996)
shape = SubResource("BoxShape3D_gsdrn")
[node name="collisionbody" type="CollisionShape3D" parent="CharacterBody3D"]
transform = Transform3D(0.298684, 0, 0, 0, 1.03598, 0, 0, 0, 1.32184, -0.0077214, 0.302573, 0.112231)
shape = SubResource("BoxShape3D_gsdrn")
[node name="collisionlefthand" type="CollisionShape3D" parent="CharacterBody3D"]
transform = Transform3D(0.121545, 0, 0, 0, 1.24748, 0, 0, 0, 1.32184, 0.339307, 0.207107, 0.113714)
shape = SubResource("BoxShape3D_gsdrn")
[node name="collisionrighthand" type="CollisionShape3D" parent="CharacterBody3D"]
transform = Transform3D(0.121545, 0, 0, 0, 1.24748, 0, 0, 0, 1.32184, -0.353562, 0.207107, 0.113714)
shape = SubResource("BoxShape3D_gsdrn")
[node name="collisionrightleg" type="CollisionShape3D" parent="CharacterBody3D"]
transform = Transform3D(0.121545, 0, 0, 0, 1.10995, 0, 0, 0, 1.32184, -0.135186, -0.560633, 0.112023)
shape = SubResource("BoxShape3D_gsdrn")
[node name="collisionleftleg" type="CollisionShape3D" parent="CharacterBody3D"]
transform = Transform3D(0.121545, 0, 0, 0, 1.10995, 0, 0, 0, 1.32184, 0.113237, -0.560633, 0.112023)
shape = SubResource("BoxShape3D_gsdrn")
[node name="Playerv2" type="MeshInstance3D" parent="."]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, -0.0124283, -1.10113, 0.0509212)
mesh = ExtResource("7_jg2rj")
surface_material_override/0 = ExtResource("6_md2fv")
surface_material_override/1 = ExtResource("6_md2fv")
surface_material_override/2 = ExtResource("7_2k5kn")
surface_material_override/3 = ExtResource("7_2k5kn")
surface_material_override/4 = ExtResource("6_md2fv")
surface_material_override/5 = ExtResource("6_md2fv")
surface_material_override/6 = ExtResource("7_2k5kn")
surface_material_override/7 = ExtResource("7_2k5kn")
surface_material_override/8 = ExtResource("7_2k5kn")
surface_material_override/9 = ExtResource("6_md2fv")
surface_material_override/10 = ExtResource("6_md2fv")
surface_material_override/11 = ExtResource("6_md2fv")
surface_material_override/12 = ExtResource("7_2k5kn")
surface_material_override/13 = ExtResource("6_md2fv")
surface_material_override/14 = ExtResource("7_2k5kn")
surface_material_override/15 = ExtResource("6_md2fv")
surface_material_override/16 = ExtResource("7_2k5kn")
surface_material_override/17 = ExtResource("6_md2fv")
surface_material_override/18 = ExtResource("6_md2fv")
surface_material_override/19 = ExtResource("7_2k5kn")
surface_material_override/20 = ExtResource("7_2k5kn")
surface_material_override/21 = ExtResource("7_2k5kn")
surface_material_override/22 = ExtResource("6_md2fv")
surface_material_override/23 = ExtResource("6_md2fv")
surface_material_override/24 = ExtResource("6_md2fv")
surface_material_override/25 = ExtResource("7_2k5kn")

View File

@ -110,6 +110,7 @@ text = "Select
script = ExtResource("1_nua8c")
[node name="Choose_class_OS" type="Control" parent="."]
visible = false
layout_mode = 1
anchors_preset = 0
offset_left = -41.0
@ -218,6 +219,7 @@ text = "Select"
script = ExtResource("1_nua8c")
[node name="Choose_class_CS" type="Control" parent="."]
visible = false
layout_mode = 1
anchors_preset = 14
anchor_top = 0.5

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=7 format=3 uid="uid://gxfhitfre2fj"]
[ext_resource type="Texture2D" uid="uid://vnk3r1p4ao3n" path="res://textures/prototype-textures/Prototype_symbol_cross_32x32px.png" id="1_g1v70"]
[ext_resource type="Texture2D" uid="uid://c4pah1vj0aa4x" path="res://textures/prototype-textures/Prototype_symbol_cross_32x32px.png" id="1_g1v70"]
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_mhtpk"]

View File

@ -2,7 +2,7 @@
[ext_resource type="Script" path="res://scripts/ConnectButton.gd" id="1_nhpm2"]
[ext_resource type="Script" path="res://scripts/Nickname.gd" id="2_5xejq"]
[ext_resource type="Texture2D" uid="uid://vnk3r1p4ao3n" path="res://textures/prototype-textures/Prototype_symbol_cross_32x32px.png" id="2_mk5ih"]
[ext_resource type="Texture2D" uid="uid://c4pah1vj0aa4x" path="res://textures/prototype-textures/Prototype_symbol_cross_32x32px.png" id="2_mk5ih"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_eqsfo"]
texture = ExtResource("2_mk5ih")

View File

@ -136,7 +136,7 @@ size = Vector3(1.04123, 0.678194, 1.08446)
material = SubResource("StandardMaterial3D_xwpjv")
[node name="box9" type="CSGBox3D" parent="CSGCombiner3D/street/box[cs]/box6"]
transform = Transform3D(1, 0, 7.10543e-15, 0, 1, 0, -7.10543e-15, 0, 1, -5.87594, -0.211776, 2.18483)
transform = Transform3D(1, 0, 2.13163e-14, 0, 1, 0, -2.13163e-14, 0, 1, -5.87594, -0.211776, 2.18483)
size = Vector3(1.04123, 0.678194, 1.08446)
material = ExtResource("3_3k8s5")

View File

@ -1,485 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<contributor>
<author>Anonymous</author>
<authoring_tool>Collada Exporter for Blender 2.6+, by Juan Linietsky (juan@codenix.com)</authoring_tool>
</contributor>
<created>2024-02-17T21:56:07Z</created>
<modified>2024-02-17T21:56:07Z</modified>
<unit meter="1.0" name="meter"/>
<up_axis>Z_UP</up_axis>
</asset>
<library_effects>
<effect id="id-fx-2" name="Material-fx">
<profile_COMMON>
<technique sid="common">
<blinn>
<emission>
<color> 0.800000011920929 0.800000011920929 0.800000011920929 1.0 </color>
</emission>
<ambient>
<color> 0.0 0.0 0.0 1.0 </color>
</ambient>
<diffuse>
<color> 0.6400000095367432 0.6400000095367432 0.6400000095367432 0.8 </color>
</diffuse>
<specular>
<color> 0.5 0.5 0.5 1.0 </color>
</specular>
<shininess>
<float>50</float>
</shininess>
<reflective>
<color> 0.5 0.5 0.5 1.0 </color>
</reflective>
<index_of_refraction>
<float>1.2</float>
</index_of_refraction>
</blinn>
<extra>
<technique profile="FCOLLADA">
</technique>
<technique profile="GOOGLEEARTH">
<double_sided>1</double_sided>
</technique>
</extra>
</technique>
</profile_COMMON>
</effect>
<effect id="id-fx-6" name="Material.001-fx">
<profile_COMMON>
<technique sid="common">
<blinn>
<emission>
<color> 0.800000011920929 0.800000011920929 0.800000011920929 1.0 </color>
</emission>
<ambient>
<color> 0.0 0.0 0.0 1.0 </color>
</ambient>
<diffuse>
<color> 0.6400000095367432 0.6400000095367432 0.6400000095367432 0.8 </color>
</diffuse>
<specular>
<color> 0.5 0.5 0.5 1.0 </color>
</specular>
<shininess>
<float>50</float>
</shininess>
<reflective>
<color> 0.5 0.5 0.5 1.0 </color>
</reflective>
<index_of_refraction>
<float>1.2</float>
</index_of_refraction>
</blinn>
<extra>
<technique profile="FCOLLADA">
</technique>
<technique profile="GOOGLEEARTH">
<double_sided>1</double_sided>
</technique>
</extra>
</technique>
</profile_COMMON>
</effect>
<effect id="id-fx-10" name="Material.002-fx">
<profile_COMMON>
<technique sid="common">
<blinn>
<emission>
<color> 0.800000011920929 0.800000011920929 0.800000011920929 1.0 </color>
</emission>
<ambient>
<color> 0.0 0.0 0.0 1.0 </color>
</ambient>
<diffuse>
<color> 0.6400000095367432 0.6400000095367432 0.6400000095367432 0.8 </color>
</diffuse>
<specular>
<color> 0.5 0.5 0.5 1.0 </color>
</specular>
<shininess>
<float>50</float>
</shininess>
<reflective>
<color> 0.5 0.5 0.5 1.0 </color>
</reflective>
<index_of_refraction>
<float>1.2</float>
</index_of_refraction>
</blinn>
<extra>
<technique profile="FCOLLADA">
</technique>
<technique profile="GOOGLEEARTH">
<double_sided>1</double_sided>
</technique>
</extra>
</technique>
</profile_COMMON>
</effect>
</library_effects>
<library_materials>
<material id="id-material-3" name="Material">
<instance_effect url="#id-fx-2"/>
</material>
<material id="id-material-7" name="Material.001">
<instance_effect url="#id-fx-6"/>
</material>
<material id="id-material-11" name="Material.002">
<instance_effect url="#id-fx-10"/>
</material>
</library_materials>
<library_geometries>
<geometry id="id-mesh-4" name="Cube">
<mesh>
<source id="id-mesh-4-positions">
<float_array id="id-mesh-4-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-4-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-4-normals">
<float_array id="id-mesh-4-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-4-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-4-texcoord-0">
<float_array id="id-mesh-4-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-4-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-4-vertices">
<input semantic="POSITION" source="#id-mesh-4-positions"/>
</vertices>
<polygons count="6" material="id-trimat-5">
<input semantic="VERTEX" source="#id-mesh-4-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-4-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-4-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
<geometry id="id-mesh-8" name="Cube.001">
<mesh>
<source id="id-mesh-8-positions">
<float_array id="id-mesh-8-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-8-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-8-normals">
<float_array id="id-mesh-8-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-8-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-8-texcoord-0">
<float_array id="id-mesh-8-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-8-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-8-vertices">
<input semantic="POSITION" source="#id-mesh-8-positions"/>
</vertices>
<polygons count="6" material="id-trimat-9">
<input semantic="VERTEX" source="#id-mesh-8-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-8-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-8-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
<geometry id="id-mesh-12" name="Cube.002">
<mesh>
<source id="id-mesh-12-positions">
<float_array id="id-mesh-12-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-12-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-12-normals">
<float_array id="id-mesh-12-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-12-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-12-texcoord-0">
<float_array id="id-mesh-12-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-12-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-12-vertices">
<input semantic="POSITION" source="#id-mesh-12-positions"/>
</vertices>
<polygons count="6" material="id-trimat-13">
<input semantic="VERTEX" source="#id-mesh-12-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-12-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-12-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
<geometry id="id-mesh-14" name="Cube.003">
<mesh>
<source id="id-mesh-14-positions">
<float_array id="id-mesh-14-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-14-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-14-normals">
<float_array id="id-mesh-14-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-14-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-14-texcoord-0">
<float_array id="id-mesh-14-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-14-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-14-vertices">
<input semantic="POSITION" source="#id-mesh-14-positions"/>
</vertices>
<polygons count="6" material="id-trimat-15">
<input semantic="VERTEX" source="#id-mesh-14-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-14-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-14-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
<geometry id="id-mesh-16" name="Cube.004">
<mesh>
<source id="id-mesh-16-positions">
<float_array id="id-mesh-16-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-16-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-16-normals">
<float_array id="id-mesh-16-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-16-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-16-texcoord-0">
<float_array id="id-mesh-16-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-16-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-16-vertices">
<input semantic="POSITION" source="#id-mesh-16-positions"/>
</vertices>
<polygons count="6" material="id-trimat-17">
<input semantic="VERTEX" source="#id-mesh-16-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-16-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-16-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
<geometry id="id-mesh-18" name="Cube.005">
<mesh>
<source id="id-mesh-18-positions">
<float_array id="id-mesh-18-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-18-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-18-normals">
<float_array id="id-mesh-18-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-18-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-18-texcoord-0">
<float_array id="id-mesh-18-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-18-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-18-vertices">
<input semantic="POSITION" source="#id-mesh-18-positions"/>
</vertices>
<polygons count="6" material="id-trimat-19">
<input semantic="VERTEX" source="#id-mesh-18-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-18-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-18-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
</library_geometries>
<library_visual_scenes>
<visual_scene id="id-scene-1" name="scene">
<node id="Cube" name="Cube" type="NODE">
<matrix sid="transform"> 2.6000001430511475 0.0 0.0 0.0 0.0 0.19977541267871857 0.0 0.0 0.0 0.0 0.4598263204097748 2.203359842300415 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-4">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-5" target="#id-material-3"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
<node id="Cube.001" name="Cube.001" type="NODE">
<matrix sid="transform"> -1.57242467935248e-08 0.0009324373677372932 0.2314780056476593 1.6276607513427734 1.6476175090929246e-08 0.11205510795116425 -0.0019261838169768453 -0.012317478656768799 -0.5210391283035278 3.515240321050328e-09 -7.046598859972164e-09 1.4152696132659912 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-8">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-9" target="#id-material-7"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
<node id="Cube.002" name="Cube.002" type="NODE">
<matrix sid="transform"> 0.012317821383476257 0.0 -0.23190557956695557 -1.2648444175720215 0.0 0.11228424310684204 0.0 -0.016380950808525085 0.9720970988273621 0.0 0.002938566030934453 1.156082034111023 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-12">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-13" target="#id-material-11"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
<node id="Cube.003" name="Cube.003" type="NODE">
<matrix sid="transform"> 0.4965575635433197 0.0 0.0 2.8978543281555176 0.0 0.16011132299900055 0.0 -0.0013670185580849648 0.0 0.0 0.24370159208774567 2.1922411918640137 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-14">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-15" target="#id-material-7"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
<node id="Cube.004" name="Cube.004" type="NODE">
<matrix sid="transform"> 0.4965575635433197 0.0 0.0 3.762096643447876 0.0 0.19658255577087402 0.0 -0.0028609037399291992 0.0 0.0 0.28466933965682983 2.1854066848754883 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-16">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-17" target="#id-material-7"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
<node id="Cube.005" name="Cube.005" type="NODE">
<matrix sid="transform"> 0.3889171779155731 0.0 0.0 -2.7596819400787354 0.0 0.06061943992972374 0.0 0.0 0.0 0.0 0.06876473128795624 2.203359842300415 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-18">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-19" target="#id-material-11"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
</visual_scene>
</library_visual_scenes>
<scene>
<instance_visual_scene url="#id-scene-1" />
</scene>
</COLLADA>

View File

@ -1,34 +0,0 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dndsa6rm6hovq"
path="res://.godot/imported/automatto.dae-f7024c685fe1af02633a09bb6d2a998a.scn"
[deps]
source_file="res://scenes/models/automatto.dae"
dest_files=["res://.godot/imported/automatto.dae-f7024c685fe1af02633a09bb6d2a998a.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1

Binary file not shown.

View File

@ -1,34 +0,0 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://coa22cxx7aoe1"
path="res://.godot/imported/buddy.glb-8ddedc557e087d8081a0b6ce807345a2.scn"
[deps]
source_file="res://scenes/models/buddy.glb"
dest_files=["res://.godot/imported/buddy.glb-8ddedc557e087d8081a0b6ce807345a2.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1010 KiB

View File

@ -1,36 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dirdtjfuc7ibi"
path.s3tc="res://.godot/imported/buddy_1613124237_95-p-fon-kozha-zheltaya-205.jpg-ae0efba9d59eb45d45ee0c23fbb9243e.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={}
[deps]
source_file="res://scenes/models/buddy_1613124237_95-p-fon-kozha-zheltaya-205.jpg"
dest_files=["res://.godot/imported/buddy_1613124237_95-p-fon-kozha-zheltaya-205.jpg-ae0efba9d59eb45d45ee0c23fbb9243e.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

View File

@ -1,218 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<contributor>
<author>Anonymous</author>
<authoring_tool>Collada Exporter for Blender 2.6+, by Juan Linietsky (juan@codenix.com)</authoring_tool>
</contributor>
<created>2024-02-17T21:50:36Z</created>
<modified>2024-02-17T21:50:36Z</modified>
<unit meter="1.0" name="meter"/>
<up_axis>Z_UP</up_axis>
</asset>
<library_effects>
<effect id="id-fx-2" name="Material.002-fx">
<profile_COMMON>
<technique sid="common">
<blinn>
<emission>
<color> 0.800000011920929 0.800000011920929 0.800000011920929 1.0 </color>
</emission>
<ambient>
<color> 0.0 0.0 0.0 1.0 </color>
</ambient>
<diffuse>
<color> 0.6400000095367432 0.6400000095367432 0.6400000095367432 0.8 </color>
</diffuse>
<specular>
<color> 0.5 0.5 0.5 1.0 </color>
</specular>
<shininess>
<float>50</float>
</shininess>
<reflective>
<color> 0.5 0.5 0.5 1.0 </color>
</reflective>
<index_of_refraction>
<float>1.2</float>
</index_of_refraction>
</blinn>
<extra>
<technique profile="FCOLLADA">
</technique>
<technique profile="GOOGLEEARTH">
<double_sided>1</double_sided>
</technique>
</extra>
</technique>
</profile_COMMON>
</effect>
<effect id="id-fx-6" name="Material.001-fx">
<profile_COMMON>
<technique sid="common">
<blinn>
<emission>
<color> 0.800000011920929 0.800000011920929 0.800000011920929 1.0 </color>
</emission>
<ambient>
<color> 0.0 0.0 0.0 1.0 </color>
</ambient>
<diffuse>
<color> 0.6400000095367432 0.6400000095367432 0.6400000095367432 0.8 </color>
</diffuse>
<specular>
<color> 0.5 0.5 0.5 1.0 </color>
</specular>
<shininess>
<float>50</float>
</shininess>
<reflective>
<color> 0.5 0.5 0.5 1.0 </color>
</reflective>
<index_of_refraction>
<float>1.2</float>
</index_of_refraction>
</blinn>
<extra>
<technique profile="FCOLLADA">
</technique>
<technique profile="GOOGLEEARTH">
<double_sided>1</double_sided>
</technique>
</extra>
</technique>
</profile_COMMON>
</effect>
</library_effects>
<library_materials>
<material id="id-material-3" name="Material.002">
<instance_effect url="#id-fx-2"/>
</material>
<material id="id-material-7" name="Material.001">
<instance_effect url="#id-fx-6"/>
</material>
</library_materials>
<library_geometries>
<geometry id="id-mesh-4" name="Cube">
<mesh>
<source id="id-mesh-4-positions">
<float_array id="id-mesh-4-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-4-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-4-normals">
<float_array id="id-mesh-4-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-4-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-4-texcoord-0">
<float_array id="id-mesh-4-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-4-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-4-vertices">
<input semantic="POSITION" source="#id-mesh-4-positions"/>
</vertices>
<polygons count="6" material="id-trimat-5">
<input semantic="VERTEX" source="#id-mesh-4-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-4-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-4-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
<geometry id="id-mesh-8" name="Cube.001">
<mesh>
<source id="id-mesh-8-positions">
<float_array id="id-mesh-8-positions-array" count="72"> 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 1.0 -1.0 1.0 1.0 -1.0 1.0 -1.0 -1.0 -1.0 -1.0 -1.0 1.0 1.0 -1.0 1.0 1.0 1.0 1.0 -1.0 1.0 1.0 -1.0 -1.0 -1.0 1.0 -1.0 -1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 -1.0</float_array>
<technique_common>
<accessor source="#id-mesh-8-positions-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-8-normals">
<float_array id="id-mesh-8-normals-array" count="72"> 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 0.0 0.0 -1.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0</float_array>
<technique_common>
<accessor source="#id-mesh-8-normals-array" count="24" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="id-mesh-8-texcoord-0">
<float_array id="id-mesh-8-texcoord-0-array" count="48"> 0.625 0.5 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1.0 0.375 1.0 0.375 0.0 0.625 0.0 0.625 0.25 0.375 0.25 0.125 0.5 0.375 0.5 0.375 0.75 0.125 0.75 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5</float_array>
<technique_common>
<accessor source="#id-mesh-8-texcoord-0-array" count="24" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="id-mesh-8-vertices">
<input semantic="POSITION" source="#id-mesh-8-positions"/>
</vertices>
<polygons count="6" material="id-trimat-9">
<input semantic="VERTEX" source="#id-mesh-8-vertices" offset="0"/>
<input semantic="NORMAL" source="#id-mesh-8-normals" offset="0"/>
<input semantic="TEXCOORD" source="#id-mesh-8-texcoord-0" offset="0" set="0"/>
<p> 0 1 2 3 </p>
<p> 4 5 6 7 </p>
<p> 8 9 10 11 </p>
<p> 12 13 14 15 </p>
<p> 16 17 18 19 </p>
<p> 20 21 22 23 </p>
</polygons>
</mesh>
</geometry>
</library_geometries>
<library_visual_scenes>
<visual_scene id="id-scene-1" name="scene">
<node id="Cube" name="Cube" type="NODE">
<matrix sid="transform"> 0.28390204906463623 0.0 0.30559131503105164 -0.016092630103230476 0.0 0.11151131987571716 0.0 0.0 -0.7800144553184509 0.0 0.1112261414527893 -0.06142665445804596 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-4">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-5" target="#id-material-3"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
<node id="Cube.001" name="Cube.001" type="NODE">
<matrix sid="transform"> 1.2125928401947021 0.0 0.0 -1.1341843605041504 0.0 0.12897871434688568 0.0 0.0 0.0 0.0 0.33654701709747314 0.5419423580169678 0.0 0.0 0.0 1.0 </matrix>
<instance_geometry url="#id-mesh-8">
<bind_material>
<technique_common>
<instance_material symbol="id-trimat-9" target="#id-material-7"/>
</technique_common>
</bind_material>
</instance_geometry>
</node>
</visual_scene>
</library_visual_scenes>
<scene>
<instance_visual_scene url="#id-scene-1" />
</scene>
</COLLADA>

View File

@ -1,34 +0,0 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://hf47u08p80fo"
path="res://.godot/imported/pistoletto.dae-04bdabc945b0c35e4dde01b17b4398c8.scn"
[deps]
source_file="res://scenes/models/pistoletto.dae"
dest_files=["res://.godot/imported/pistoletto.dae-04bdabc945b0c35e4dde01b17b4398c8.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/naming_version=1
gltf/embedded_image_handling=1

View File

@ -1,53 +1,105 @@
[gd_scene load_steps=7 format=3 uid="uid://b2jhgtduapovl"]
[gd_scene load_steps=9 format=3 uid="uid://b2jhgtduapovl"]
[ext_resource type="Script" path="res://scripts/Player.gd" id="1_8hh2g"]
[ext_resource type="PackedScene" uid="uid://cnu1vf8k5i3tv" path="res://scenes/models/pistol.tscn" id="2_86kn4"]
[ext_resource type="PackedScene" uid="uid://caos4gg5cd6f6" path="res://scenes/models/ak_47.tscn" id="3_sko6x"]
[ext_resource type="Script" path="res://scripts/Player.gd" id="1_o6o4b"]
[ext_resource type="PackedScene" uid="uid://cnu1vf8k5i3tv" path="res://scenes/models/pistol.tscn" id="2_nxbij"]
[ext_resource type="PackedScene" uid="uid://caos4gg5cd6f6" path="res://scenes/models/ak_47.tscn" id="3_r56e3"]
[ext_resource type="Material" path="res://textures/materials/orange.res" id="6_md2fv"]
[ext_resource type="Material" path="res://textures/materials/black90%.res" id="7_2k5kn"]
[ext_resource type="ArrayMesh" uid="uid://dpdsmpuycacsx" path="res://models/playerv2.obj" id="7_jg2rj"]
[sub_resource type="SphereMesh" id="SphereMesh_fp0bl"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_yyp7b"]
[sub_resource type="BoxShape3D" id="BoxShape3D_gsdrn"]
size = Vector3(1.44899, 0.8463, 0.132389)
[sub_resource type="CapsuleMesh" id="CapsuleMesh_jqfxo"]
[node name="player" type="CharacterBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.15595, 0)
script = ExtResource("1_o6o4b")
[node name="player" type="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
[node name="Head" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.94573, 0)
[node name="CharacterBody3D" type="CharacterBody3D" parent="."]
script = ExtResource("1_8hh2g")
[node name="Camera" type="Camera3D" parent="Head"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0834589, 0)
fov = 90.0
[node name="Head" type="Node3D" parent="CharacterBody3D"]
[node name="Camera" type="Camera3D" parent="CharacterBody3D/Head"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.675496, 0)
[node name="viewRaycast" type="RayCast3D" parent="CharacterBody3D/Head/Camera"]
[node name="viewRaycast" type="RayCast3D" parent="Head/Camera"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.0123241, -0.315944)
target_position = Vector3(0, 0, -100)
[node name="Hand" type="Node3D" parent="CharacterBody3D/Head/Camera"]
[node name="Hand" type="Node3D" parent="Head/Camera"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 0.72454, -0.463491, -0.808041)
[node name="knife" type="MeshInstance3D" parent="CharacterBody3D/Head/Camera/Hand"]
transform = Transform3D(0.16, 0, 0, 0, 0.16, 0, 0, 0, 0.16, 0, 0, 0)
visible = false
[node name="knife" type="MeshInstance3D" parent="Head/Camera/Hand"]
transform = Transform3D(0.16, 0, 0, 0, 0.16, 0, 0, 0, 0.16, -0.158471, 0.140001, 0.229943)
mesh = SubResource("SphereMesh_fp0bl")
[node name="raycast" type="RayCast3D" parent="CharacterBody3D/Head/Camera/Hand/knife"]
[node name="raycast" type="RayCast3D" parent="Head/Camera/Hand/knife"]
[node name="pistol" parent="CharacterBody3D/Head/Camera/Hand" instance=ExtResource("2_86kn4")]
transform = Transform3D(1, 0, -3.55271e-15, 0, 1, 0, 3.55271e-15, 0, 1, 0, 0, 0)
[node name="pistol" parent="Head/Camera/Hand" instance=ExtResource("2_nxbij")]
transform = Transform3D(1, 0, -3.55271e-15, 0, 1, 0, 3.55271e-15, 0, 1, 2.38419e-07, -0.0344509, 0.118615)
visible = false
[node name="ak-47" parent="CharacterBody3D/Head/Camera/Hand" instance=ExtResource("3_sko6x")]
[node name="ak-47" parent="Head/Camera/Hand" instance=ExtResource("3_r56e3")]
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, -0.30437, -0.235472, 0.183832)
visible = false
[node name="Nickname" type="Label3D" parent="CharacterBody3D/Head"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.24983, 0)
[node name="Nickname" type="Label3D" parent="Head"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.541, 0)
billboard = 1
text = "Unnamed"
[node name="CollisionShape3D" type="CollisionShape3D" parent="CharacterBody3D"]
shape = SubResource("CapsuleShape3D_yyp7b")
[node name="Playerv2" type="MeshInstance3D" parent="Head"]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, -2.04673, 0)
mesh = ExtResource("7_jg2rj")
skeleton = NodePath("../../..")
surface_material_override/0 = ExtResource("6_md2fv")
surface_material_override/1 = ExtResource("6_md2fv")
surface_material_override/2 = ExtResource("7_2k5kn")
surface_material_override/3 = ExtResource("7_2k5kn")
surface_material_override/4 = ExtResource("6_md2fv")
surface_material_override/5 = ExtResource("6_md2fv")
surface_material_override/6 = ExtResource("7_2k5kn")
surface_material_override/7 = ExtResource("7_2k5kn")
surface_material_override/8 = ExtResource("7_2k5kn")
surface_material_override/9 = ExtResource("6_md2fv")
surface_material_override/10 = ExtResource("6_md2fv")
surface_material_override/11 = ExtResource("6_md2fv")
surface_material_override/12 = ExtResource("7_2k5kn")
surface_material_override/13 = ExtResource("6_md2fv")
surface_material_override/14 = ExtResource("7_2k5kn")
surface_material_override/15 = ExtResource("6_md2fv")
surface_material_override/16 = ExtResource("7_2k5kn")
surface_material_override/17 = ExtResource("6_md2fv")
surface_material_override/18 = ExtResource("6_md2fv")
surface_material_override/19 = ExtResource("7_2k5kn")
surface_material_override/20 = ExtResource("7_2k5kn")
surface_material_override/21 = ExtResource("7_2k5kn")
surface_material_override/22 = ExtResource("6_md2fv")
surface_material_override/23 = ExtResource("6_md2fv")
surface_material_override/24 = ExtResource("6_md2fv")
surface_material_override/25 = ExtResource("7_2k5kn")
[node name="MeshInstance3D" type="MeshInstance3D" parent="CharacterBody3D"]
mesh = SubResource("CapsuleMesh_jqfxo")
[node name="collisionhead" type="CollisionShape3D" parent="."]
transform = Transform3D(0.249323, 0, 0, 0, 0.447434, 0, 0, 0, 3.00119, -0.00773959, 0.986574, 0.0380512)
shape = SubResource("BoxShape3D_gsdrn")
[node name="collisionbody" type="CollisionShape3D" parent="."]
transform = Transform3D(0.298684, 0, 0, 0, 1.03598, 0, 0, 0, 1.32184, -0.0077214, 0.302573, 0.0642047)
shape = SubResource("BoxShape3D_gsdrn")
[node name="collisionlefthand" type="CollisionShape3D" parent="."]
transform = Transform3D(0.121545, 0, 0, 0, 1.24748, 0, 0, 0, 1.32184, 0.339307, 0.207107, 0.0578248)
shape = SubResource("BoxShape3D_gsdrn")
[node name="collisionrighthand" type="CollisionShape3D" parent="."]
transform = Transform3D(0.121545, 0, 0, 0, 1.24748, 0, 0, 0, 1.32184, -0.353562, 0.207107, 0.060746)
shape = SubResource("BoxShape3D_gsdrn")
[node name="collisionrightleg" type="CollisionShape3D" parent="."]
transform = Transform3D(0.121545, 0, 0, 0, 1.10995, 0, 0, 0, 1.32184, -0.135186, -0.653192, 0.0674681)
shape = SubResource("BoxShape3D_gsdrn")
[node name="collisionleftleg" type="CollisionShape3D" parent="."]
transform = Transform3D(0.121545, 0, 0, 0, 1.26676, 0, 0, 0, 1.32184, 0.113237, -0.590235, 0.0684103)
shape = SubResource("BoxShape3D_gsdrn")

View File

@ -40,8 +40,8 @@ func _ready():
map_path = path
#######################################SERVER####################################
func find_cb3d_by_internal_id(internal_id):
return server_map.get_node("player" + str(internal_id)).find_child("CharacterBody3D")
func find_playermodel_by_internal_id(internal_id):
return server_map.get_node("player" + str(internal_id))
func StartServer(map_name):
await get_tree().create_timer(0.01).timeout #костыль пиздец но мне похую как-то
@ -127,8 +127,8 @@ func _Peer_Connected(client_id):
print("New client's properties: " + str(clients[client_id]))
var puppet = player_model.instantiate()
var CB3D = puppet.find_child("CharacterBody3D")
CB3D.set_properties(clients[client_id])
#var CB3D = puppet.find_child("CharacterBody3D")
puppet.set_properties(clients[client_id])
server_map.add_child(puppet)
@ -140,7 +140,7 @@ func client_ready(client_id):
send_everyone_except(client_id, ["spawn_puppet", clients[client_id]])
client["ready"] = true
var client_cb3d = find_cb3d_by_internal_id(internal_id)
var client_playermodel = find_playermodel_by_internal_id(internal_id)
if (client["class_type"] == 0):
var class_spawnpoint = find_class_type_by_number(client["class_type"])["spawnpoint"]
client["position"] = Vector3(class_spawnpoint[0], class_spawnpoint[1], class_spawnpoint[2])
@ -150,8 +150,8 @@ func client_ready(client_id):
client["position"] = spawnpoints_os.pick_random().get_class_spawnpoint(index)
elif (client["class_type"] < 0):
client["position"] = spawnpoints_cs.pick_random().get_class_spawnpoint(index)
client_cb3d.set_properties(client)
client_cb3d.teleport.rpc_id(client_id, Vector3(client["position"].x, client["position"].y, client["position"].z))
client_playermodel.set_properties(client)
client_playermodel.teleport.rpc_id(client_id, Vector3(client["position"].x, client["position"].y, client["position"].z))
func _Peer_Disconnected(client_id):
print("User " + str(client_id) + " has disconnected")
@ -173,13 +173,13 @@ func get_character_properties(client_id):
func sync_client(client_id, position, rotation):
var client = clients[client_id]
var internal_id = str(client["internal_id"])
var client_cb3d = find_cb3d_by_internal_id(internal_id)
client_cb3d.position = position
client_cb3d.find_child("Head").rotation.y = rotation.y
client_cb3d.find_child("Head").find_child("Camera").rotation.x = rotation.x
var client_playermodel = find_playermodel_by_internal_id(internal_id)
client_playermodel.position = position
client_playermodel.find_child("Head").rotation.y = rotation.y
client_playermodel.find_child("Head").find_child("Camera").rotation.x = rotation.x
client["position"] = position
client["rotation"] = rotation
send_everyone_except(client_id, [client_cb3d.sync_puppet, internal_id, position, rotation])
send_everyone_except(client_id, [client_playermodel.sync_puppet, internal_id, position, rotation])
@rpc ("any_peer", "call_remote", "reliable")
func get_client_list(client_id):
@ -192,8 +192,8 @@ func get_server_settings(client_id):
print("Sending game settings")
var client = clients[client_id]
var internal_id = str(client["internal_id"])
var client_cb3d = find_cb3d_by_internal_id(internal_id)
client_cb3d.set_game_settings.rpc_id(client_id, settings["game"])
var client_playermodel = find_playermodel_by_internal_id(internal_id)
client_playermodel.set_game_settings.rpc_id(client_id, settings["game"])
@rpc ("any_peer", "call_remote", "reliable")
func set_nickname(client_id, nickname):
@ -207,16 +207,16 @@ func shot(client_id):
var current_weapon = settings["game"]["weapons"].find_key(find_weapon_by_number(client["current_weapon"]["number"]))
var current_weapon_settings = settings["game"]["weapons"][current_weapon]
var client_cb3d = find_cb3d_by_internal_id(internal_id)
var raycast:RayCast3D = client_cb3d.get_node("Head/Camera/viewRaycast")
var weapon_raycast:RayCast3D = client_cb3d.get_node("Head/Camera/Hand/" + str(current_weapon) + "/raycast")
var client_playermodel = find_playermodel_by_internal_id(internal_id)
var raycast:RayCast3D = client_playermodel.get_node("Head/Camera/viewRaycast")
var weapon_raycast:RayCast3D = client_playermodel.get_node("Head/Camera/Hand/" + str(current_weapon) + "/raycast")
raycast.target_position.z = -current_weapon_settings["range"]
raycast.force_raycast_update()
raycast.force_update_transform()
var target_point = raycast.get_collision_point()
weapon_raycast.target_position = weapon_raycast.to_local(target_point) * 1.1
weapon_raycast.rotation.y = atan((weapon_raycast.position.x - client_cb3d.position.x) / ((-current_weapon_settings["range"]) - (abs(weapon_raycast.position.z - client_cb3d.position.z))))
weapon_raycast.rotation.y = atan((weapon_raycast.position.x - client_playermodel.position.x) / ((-current_weapon_settings["range"]) - (abs(weapon_raycast.position.z - client_playermodel.position.z))))
weapon_raycast.target_position.y += current_weapon_settings["spreading"] * randf() * sin(randf() * 2 * PI)
weapon_raycast.target_position.z += current_weapon_settings["spreading"] * randf() * cos(randf() * 2 * PI)
@ -226,13 +226,14 @@ func shot(client_id):
var target = weapon_raycast.get_collider()
if (not target is CharacterBody3D): return
var target_internal_id = int(target.get_node("..").name.get_slice("player", 1))
#var target_internal_id = int(target.get_node("..").name.get_slice("player", 1))
var target_internal_id = int(target.name.get_slice("player", 1))
var target_client
for checking_client_id in clients.keys():
if (clients[checking_client_id]["internal_id"] == target_internal_id):
target_client = clients[checking_client_id]
var target_cb3d = find_cb3d_by_internal_id(target_internal_id)
#var target_playermodel = find_playermodel_by_internal_id(target_internal_id)
var target_client_id = int(clients.find_key(target_client))
var damage = current_weapon_settings["damage"];
@ -257,8 +258,9 @@ func shot(client_id):
target_client["position"] = respawn
target_client["HP"] = 100
target_cb3d.teleport.rpc_id(target_client_id, target_client["position"])
target_cb3d.set_hp.rpc_id(target_client_id, target_client["HP"])
target.teleport.rpc_id(target_client_id, target_client["position"])
target.set_hp.rpc_id(target_client_id, target_client["HP"])
@rpc("reliable", "call_remote", "any_peer")
func change_weapon(client_id, new_weapon_number):
var client = clients[client_id]
@ -268,9 +270,9 @@ func change_weapon(client_id, new_weapon_number):
if (settings["game"]["weapons"][weapon]["number"] == new_weapon_number):
client["current_weapon"] = settings["game"]["weapons"][weapon].duplicate()
break
var client_cb3d = find_cb3d_by_internal_id(internal_id)
client_cb3d.change_weapon(new_weapon_number)
send_everyone_except(client_id, [client_cb3d.change_weapon_puppet, internal_id, new_weapon_number])
var client_playermodel = find_playermodel_by_internal_id(internal_id)
client_playermodel.change_weapon(new_weapon_number)
send_everyone_except(client_id, [client_playermodel.change_weapon_puppet, internal_id, new_weapon_number])
@rpc("any_peer", "call_remote", "reliable")
func client_reloading(client_id):
@ -318,7 +320,7 @@ var player
var menu = preload("res://scenes/HUD/menu.tscn")
var current_map_instance
var choose_team_hud
var player_cb3d
var playermodel
@rpc ("reliable", "call_remote")
func set_character_properties(p):
@ -328,9 +330,9 @@ func set_character_properties(p):
@rpc("authority", "reliable", "call_remote")
func spawn_puppet(properties):
var puppet = player_model.instantiate()
var CB3D = puppet.find_child("CharacterBody3D")
#var CB3D = puppet.find_child("CharacterBody3D")
properties["ready"] = true
CB3D.set_properties(properties.duplicate())
puppet.set_properties(properties.duplicate())
current_map_instance.add_child(puppet)
@ -354,19 +356,20 @@ func switch_class(class_id):
player["class_type"] = class_id
rpc_id(1, "client_ready", multiplayer.get_unique_id())
current_map_instance.remove_child(choose_team_hud)
player_cb3d.set_property("is_playable", true)
player_cb3d.set_property("ready", true)
playermodel.set_property("is_playable", true)
playermodel.set_property("ready", true)
func spawn_player():
var player_node = player_model.instantiate()
player_cb3d = player_node.find_child("CharacterBody3D")
playermodel = player_model.instantiate()
var properties = player_script.new().properties.duplicate()
#playermodel = player_node.find_child("player" + str(properties["internal_id"]))
properties = player
properties["is_playable"] = false
properties["ready"] = false
player_cb3d.set_properties(properties)
playermodel.set_properties(properties)
current_map_instance.add_child(player_node)
current_map_instance.add_child(playermodel)
func ConnectToServer(ip, port):
peer.create_client(ip, port)

View File

@ -60,7 +60,7 @@ var statusLabel
func set_properties(props):
properties = props
$"Head/Nickname".text = properties["nickname"]
$"..".name = "player" + str(properties["internal_id"])
name = "player" + str(properties["internal_id"])
position = properties["position"]
if (game_settings != null):
change_weapon(properties["current_weapon"]["number"])