Commit d380d4e7 authored by Gavin An's avatar Gavin An

도끼 든 드워프

parent 589d7d59
[gd_scene format=3 uid="uid://lswmiam1ftlw"] [gd_scene format=3 uid="uid://lswmiam1ftlw"]
[ext_resource type="PackedScene" uid="uid://cd6ffpkexhiql" path="res://assets/models/hero/dwarf/dwarf.fbx" id="1_l6u5b"] [ext_resource type="PackedScene" uid="uid://cd6ffpkexhiql" path="res://assets/models/hero/dwarf/dwarf.fbx" id="1_l6u5b"]
[ext_resource type="AnimationLibrary" uid="uid://nm3agubqfbtx" path="res://assets/models/hero/dwarf/dwarf_animations.tres" id="2_npv2y"]
[node name="dwarf" unique_id=290391373 instance=ExtResource("1_l6u5b")] [node name="dwarf" unique_id=290391373 instance=ExtResource("1_l6u5b")]
[node name="Skeleton3D" parent="Armature" parent_id_path=PackedInt32Array(1160903548) index="0" unique_id=1730332693]
bones/0/rotation = Quaternion(0.08809119, 0.47563142, -0.6229485, 0.61477625)
bones/1/rotation = Quaternion(-0.002987877, 0.97087634, -0.1468189, 0.18930036)
bones/2/rotation = Quaternion(0.6164002, 0.108385436, 0.019559562, 0.77969277)
bones/3/rotation = Quaternion(-0.668005, 0.03282743, 0.24549814, 0.7017281)
bones/4/rotation = Quaternion(-0.44048968, -0.021189991, 0.015927589, 0.8973662)
bones/5/rotation = Quaternion(0.80426794, 0.5402499, 0.17848583, -0.17154016)
bones/6/rotation = Quaternion(0.48084012, -0.10265888, -0.04241444, 0.8697443)
bones/7/rotation = Quaternion(-0.44138172, 0.13634771, -0.195404, 0.8651063)
bones/8/rotation = Quaternion(-0.41485584, 0.028403582, -0.006252828, 0.90942216)
bones/9/rotation = Quaternion(0.18880537, 0.23700258, 0.8401963, 0.4497251)
bones/10/rotation = Quaternion(0.19265993, -0.0073922495, 0.0012107901, 0.9812371)
bones/11/rotation = Quaternion(-0.103649676, 0.00033059798, 0.010475408, 0.99455863)
bones/12/rotation = Quaternion(0.5557395, 0.5095257, -0.31768274, 0.5749913)
bones/13/rotation = Quaternion(0.106903546, 0.4234476, 0.5169937, 0.7361937)
bones/14/rotation = Quaternion(-0.38214406, -0.013688937, 0.2509969, 0.8892576)
bones/15/rotation = Quaternion(0.2442808, -0.028219983, 0.19281268, 0.9499231)
bones/16/rotation = Quaternion(-0.61417276, 0.46245825, -0.30934367, -0.55967027)
bones/17/rotation = Quaternion(0.43518123, -0.42996484, -0.25984555, 0.7471465)
bones/18/rotation = Quaternion(-0.5377174, 0.024481293, -0.3822374, 0.7511028)
bones/19/rotation = Quaternion(0.008421413, 0.24378517, 0.021994155, 0.9695432)
bones/20/rotation = Quaternion(0.01733755, -0.13731311, 0.07973017, 0.98716146)
bones/21/rotation = Quaternion(0.24952902, -0.085815005, 0.037913304, 0.9638121)
bones/22/rotation = Quaternion(-0.2547123, -5.965033e-08, 0.0063125584, 0.96699625)
bones/23/rotation = Quaternion(0.5326586, 1.5102553e-07, -0.013200041, 0.8462273)
[node name="AnimationPlayer" parent="." index="1" unique_id=1237411490]
libraries/ = ExtResource("2_npv2y")
...@@ -40,7 +40,7 @@ func _update_animations() -> void: ...@@ -40,7 +40,7 @@ func _update_animations() -> void:
var blend_time: float = 0.25 var blend_time: float = 0.25
if has_custom_anims: if has_custom_anims:
# fbx 내장 애니메이션 이름 매핑 (Attack, Running, Idle_11) # fbx 내장 애니메이션 이름 매핑 (Attack, Running, Idle)
var attack_anim: String = "Attack" var attack_anim: String = "Attack"
var run_anim: String = "Running" var run_anim: String = "Running"
var idle_anim: String = "Idle" var idle_anim: String = "Idle"
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
[ext_resource type="PackedScene" uid="uid://lswmiam1ftlw" path="res://src/entities/hero/dwarf/dwarf.tscn" id="1_b0qj8"] [ext_resource type="PackedScene" uid="uid://lswmiam1ftlw" path="res://src/entities/hero/dwarf/dwarf.tscn" id="1_b0qj8"]
[ext_resource type="Script" uid="uid://dsckp7uaawijh" path="res://src/entities/hero/dwarf/dwarf_hero.gd" id="1_cthrw"] [ext_resource type="Script" uid="uid://dsckp7uaawijh" path="res://src/entities/hero/dwarf/dwarf_hero.gd" id="1_cthrw"]
[ext_resource type="AnimationLibrary" uid="uid://nm3agubqfbtx" path="res://assets/models/hero/dwarf/dwarf_animations.tres" id="3_4xaoo"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_pe3j2"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_pe3j2"]
radius = 0.4 radius = 0.4
...@@ -60,4 +61,33 @@ mesh = SubResource("TorusMesh_fcx2y") ...@@ -60,4 +61,33 @@ mesh = SubResource("TorusMesh_fcx2y")
[node name="dwarf" parent="." unique_id=290391373 instance=ExtResource("1_b0qj8")] [node name="dwarf" parent="." unique_id=290391373 instance=ExtResource("1_b0qj8")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0, 0) transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0, 0)
[node name="Skeleton3D" parent="dwarf/Armature" parent_id_path=PackedInt32Array(290391373, 1160903548) index="0" unique_id=1730332693]
bones/0/rotation = Quaternion(0.08809119, 0.47563142, -0.6229485, 0.61477625)
bones/1/rotation = Quaternion(-0.002987877, 0.97087634, -0.1468189, 0.18930036)
bones/2/rotation = Quaternion(0.6164002, 0.108385436, 0.019559562, 0.77969277)
bones/3/rotation = Quaternion(-0.668005, 0.03282743, 0.24549814, 0.7017281)
bones/4/rotation = Quaternion(-0.44048968, -0.021189991, 0.015927589, 0.8973662)
bones/5/rotation = Quaternion(0.80426794, 0.5402499, 0.17848583, -0.17154016)
bones/6/rotation = Quaternion(0.48084012, -0.10265888, -0.04241444, 0.8697443)
bones/7/rotation = Quaternion(-0.44138172, 0.13634771, -0.195404, 0.8651063)
bones/8/rotation = Quaternion(-0.41485584, 0.028403582, -0.006252828, 0.90942216)
bones/9/rotation = Quaternion(0.18880537, 0.23700258, 0.8401963, 0.4497251)
bones/10/rotation = Quaternion(0.19265993, -0.0073922495, 0.0012107901, 0.9812371)
bones/11/rotation = Quaternion(-0.103649676, 0.00033059798, 0.010475408, 0.99455863)
bones/12/rotation = Quaternion(0.5557395, 0.5095257, -0.31768274, 0.5749913)
bones/13/rotation = Quaternion(0.106903546, 0.4234476, 0.5169937, 0.7361937)
bones/14/rotation = Quaternion(-0.38214406, -0.013688937, 0.2509969, 0.8892576)
bones/15/rotation = Quaternion(0.2442808, -0.028219983, 0.19281268, 0.9499231)
bones/16/rotation = Quaternion(-0.61417276, 0.46245825, -0.30934367, -0.55967027)
bones/17/rotation = Quaternion(0.43518123, -0.42996484, -0.25984555, 0.7471465)
bones/18/rotation = Quaternion(-0.5377174, 0.024481293, -0.3822374, 0.7511028)
bones/19/rotation = Quaternion(0.008421413, 0.24378517, 0.021994155, 0.9695432)
bones/20/rotation = Quaternion(0.01733755, -0.13731311, 0.07973017, 0.98716146)
bones/21/rotation = Quaternion(0.24952902, -0.085815005, 0.037913304, 0.9638121)
bones/22/rotation = Quaternion(-0.2547123, -5.965033e-08, 0.0063125584, 0.96699625)
bones/23/rotation = Quaternion(0.5326586, 1.5102553e-07, -0.013200041, 0.8462273)
[node name="AnimationPlayer" parent="dwarf" index="1" unique_id=1237411490]
libraries/ = ExtResource("3_4xaoo")
[editable path="dwarf"] [editable path="dwarf"]
...@@ -63,19 +63,20 @@ static func attach_weapon(model_instance: Node3D, unit_data: UnitData) -> void: ...@@ -63,19 +63,20 @@ static func attach_weapon(model_instance: Node3D, unit_data: UnitData) -> void:
var weapon_position: Vector3 = Vector3.ZERO var weapon_position: Vector3 = Vector3.ZERO
var texture_path: String = "" var texture_path: String = ""
if unit_data.unit_id == "Unit_Guardian": var unit_id = unit_data.unit_id
if unit_id == "Unit_Guardian":
# 가디언: 오른손에 창 (azure_spear) # 가디언: 오른손에 창 (azure_spear)
bone_name = "RightHand" bone_name = "RightHand"
attachment_name = "RightHandAttachment" attachment_name = "RightHandAttachment"
weapon_scene_path = "res://assets/models/items/weapons/azure_spear/azure_spear.glb" weapon_scene_path = "res://assets/models/items/weapons/azure_spear/azure_spear.glb"
texture_path = "res://assets/models/items/weapons/azure_spear/azure_spear_0.png" texture_path = "res://assets/models/items/weapons/azure_spear/azure_spear_0.png"
elif unit_data.unit_id == "Unit_Striker": elif unit_id == "Unit_Striker":
# 스트라이커: 오른손에 검 (azure_blade) # 스트라이커: 오른손에 검 (azure_blade)
bone_name = "RightHand" bone_name = "RightHand"
attachment_name = "RightHandAttachment" attachment_name = "RightHandAttachment"
weapon_scene_path = "res://assets/models/items/weapons/azure_blade/azure_blade.glb" weapon_scene_path = "res://assets/models/items/weapons/azure_blade/azure_blade.glb"
texture_path = "res://assets/models/items/weapons/azure_blade/azure_blade_0.png" texture_path = "res://assets/models/items/weapons/azure_blade/azure_blade_0.png"
elif unit_data.unit_id == "Unit_Ranger": elif unit_id == "Unit_Ranger":
# 레인저: 왼손에 활 (azure_bow/bow) # 레인저: 왼손에 활 (azure_bow/bow)
bone_name = "LeftHand" bone_name = "LeftHand"
attachment_name = "LeftHandAttachment" attachment_name = "LeftHandAttachment"
...@@ -84,6 +85,12 @@ static func attach_weapon(model_instance: Node3D, unit_data: UnitData) -> void: ...@@ -84,6 +85,12 @@ static func attach_weapon(model_instance: Node3D, unit_data: UnitData) -> void:
# 활을 왼손에 자연스럽게 맞추는 회전/위치 오프셋 # 활을 왼손에 자연스럽게 맞추는 회전/위치 오프셋
weapon_rotation = Vector3(0.0, 90.0, 0.0) weapon_rotation = Vector3(0.0, 90.0, 0.0)
weapon_scale = Vector3(0.8, 0.8, 0.8) weapon_scale = Vector3(0.8, 0.8, 0.8)
elif unit_id == "Hero_Dwarf":
# 드워프: 오른손에 도끼 (orcish_axe)
bone_name = "RightHand"
attachment_name = "RightHandAttachment"
weapon_scene_path = "res://assets/models/items/weapons/orcish_axe/orcish_axe.glb"
texture_path = "res://assets/models/items/weapons/orcish_axe/orcish_axe_Baked_BaseColor.png"
# 지정된 본이 존재하는지 확인 # 지정된 본이 존재하는지 확인
var bone_idx: int = skeleton.find_bone(bone_name) var bone_idx: int = skeleton.find_bone(bone_name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment