update player scene

This commit is contained in:
Nikolay Fedorov
2026-04-23 11:00:08 +03:00
parent 7beb9ffbac
commit c7f0d9e176
8 changed files with 87 additions and 30 deletions
Binary file not shown.
+42
View File
@@ -0,0 +1,42 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://b3xjq4m8fhonq"
path="res://.godot/imported/player_man.glb-c09ea8d824dd49bf945f1e4f9dbd3bba.scn"
[deps]
source_file="res://assets/player_man.glb"
dest_files=["res://.godot/imported/player_man.glb-c09ea8d824dd49bf945f1e4f9dbd3bba.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
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
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
gltf/naming_version=2
gltf/embedded_image_handling=1
Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

+41
View File
@@ -0,0 +1,41 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c2k7wyt7ngfgv"
path.s3tc="res://.godot/imported/player_man.png-3e0a4cc36eb1a6978c391c5bc2af439e.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://assets/player_man.png"
dest_files=["res://.godot/imported/player_man.png-3e0a4cc36eb1a6978c391c5bc2af439e.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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
BIN
View File
Binary file not shown.
-26
View File
@@ -1,26 +0,0 @@
[gd_scene format=3 uid="uid://bpq8lf4mcvhw5"]
[ext_resource type="Script" uid="uid://beqb88qvr2lk0" path="res://scripts/Player.gd" id="1_player"]
[ext_resource type="ArrayMesh" uid="uid://d2cd02gb8dsor" path="res://assets/player.obj" id="2_v6fml"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1"]
albedo_color = Color(0.2, 0.55, 1, 1)
metallic = 0.2
roughness = 0.6
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_1"]
radius = 0.4
height = 1.0
[node name="Player" type="CharacterBody3D" unique_id=1013211477]
script = ExtResource("1_player")
[node name="BodyMesh" type="MeshInstance3D" parent="." unique_id=1038667614]
material_override = SubResource("StandardMaterial3D_1")
mesh = ExtResource("2_v6fml")
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=754973203]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
shape = SubResource("CapsuleShape3D_1")
[node name="KickIndicator" type="MeshInstance3D" parent="." unique_id=1065321163]
+1 -1
View File
@@ -1,6 +1,6 @@
extends Node3D
const PLAYER_SCENE := preload("res://scenes/Player.tscn")
const PLAYER_SCENE := preload("res://scenes/Player.scn")
const ENEMY_SCENE := preload("res://scenes/Enemy.tscn")
const ROCK_SCENE := preload("res://scenes/Rock.tscn")
const STICK_SCENE := preload("res://scenes/Stick.tscn")
+3 -3
View File
@@ -24,7 +24,7 @@ var last_move_dir: Vector3 = Vector3.FORWARD
var _aim_yaw: float = 0.0
var _is_aiming: bool = false
@onready var mesh_node: MeshInstance3D = $BodyMesh
@onready var mesh_node: MeshInstance3D = $player_man
@onready var indicator_node: MeshInstance3D = $KickIndicator
var player_mat: StandardMaterial3D
@@ -35,8 +35,8 @@ const BASE_COLOR := Color(0.2, 0.55, 1.0)
func _ready() -> void:
add_to_group("player")
player_mat = mesh_node.material_override.duplicate() as StandardMaterial3D
mesh_node.material_override = player_mat
player_mat = mesh_node.get_surface_override_material(0).duplicate() as StandardMaterial3D
mesh_node.set_surface_override_material(0, player_mat)
_setup_indicator()
func _setup_indicator() -> void: