Commit 1299b4f8 authored by Gavin An's avatar Gavin An

드워프 무기 장착

parent d380d4e7
[gd_scene format=3 uid="uid://dekdv8mv2m736"]
[ext_resource type="PackedScene" uid="uid://cd6ffpkexhiql" path="res://assets/models/hero/dwarf/dwarf.fbx" id="1_xvq3m"]
[ext_resource type="PackedScene" uid="uid://dsbt11ss58cj6" path="res://assets/models/items/weapons/orcish_axe/orcish_axe.glb" id="2_w57cj"]
[node name="dwarf" unique_id=290391373 instance=ExtResource("1_xvq3m")]
[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/position = Vector3(-0.025674414, 0.19614388, -0.03307313)
bones/1/rotation = Quaternion(-0.002987877, 0.97087634, -0.1468189, 0.18930036)
bones/1/scale = Vector3(1.0000001, 1.0000004, 1.0000001)
bones/2/position = Vector3(6.8583915e-08, 0.39915726, -8.327794e-08)
bones/2/rotation = Quaternion(0.6164002, 0.108385436, 0.019559562, 0.77969277)
bones/2/scale = Vector3(0.99999994, 0.9999997, 0.99999976)
bones/3/position = Vector3(2.3592698e-08, 0.28666043, 2.2910636e-09)
bones/3/rotation = Quaternion(-0.668005, 0.03282743, 0.24549814, 0.7017281)
bones/3/scale = Vector3(1.0000001, 1.0000001, 1.0000002)
bones/4/position = Vector3(-3.4390524e-08, 0.22659622, 3.1969204e-08)
bones/4/rotation = Quaternion(-0.44048968, -0.021189991, 0.015927589, 0.8973662)
bones/4/scale = Vector3(0.9999999, 1, 1.0000001)
bones/5/position = Vector3(0.15964697, -0.10234622, -0.070437305)
bones/5/rotation = Quaternion(0.80426794, 0.5402499, 0.17848583, -0.17154016)
bones/5/scale = Vector3(1, 1.0000001, 1.0000001)
bones/6/position = Vector3(3.340852e-07, 0.38956138, -8.5732005e-08)
bones/6/rotation = Quaternion(0.48084012, -0.10265888, -0.04241444, 0.8697443)
bones/6/scale = Vector3(0.9999999, 0.99999994, 0.99999994)
bones/7/position = Vector3(-3.2369904e-08, 0.30617812, 1.0109879e-08)
bones/7/rotation = Quaternion(-0.44138172, 0.13634771, -0.195404, 0.8651063)
bones/7/scale = Vector3(0.9999999, 0.99999994, 0.9999999)
bones/8/position = Vector3(6.112683e-08, 0.22348526, -8.8838064e-08)
bones/8/rotation = Quaternion(-0.41485584, 0.028403582, -0.006252828, 0.90942216)
bones/8/scale = Vector3(1, 1.0000001, 0.99999994)
bones/9/position = Vector3(-0.13397275, -0.09379798, 0.056836285)
bones/9/rotation = Quaternion(0.18880537, 0.23700258, 0.8401963, 0.4497251)
bones/9/scale = Vector3(1.0000004, 1.0000002, 0.99999994)
bones/10/position = Vector3(5.335206e-08, 0.17313908, 1.0860582e-07)
bones/10/rotation = Quaternion(0.19265993, -0.0073922495, 0.0012107901, 0.9812371)
bones/10/scale = Vector3(0.9999998, 1, 1)
bones/11/position = Vector3(2.368302e-09, 0.1731394, 3.7440175e-09)
bones/11/rotation = Quaternion(-0.103649676, 0.00033059798, 0.010475408, 0.99455863)
bones/11/scale = Vector3(1.0000001, 0.9999997, 0.9999999)
bones/12/position = Vector3(0.071255475, 0.117048115, -0.011980254)
bones/12/rotation = Quaternion(0.5557395, 0.5095257, -0.31768274, 0.5749913)
bones/12/scale = Vector3(1.0000002, 1.0000004, 1.0000004)
bones/13/position = Vector3(1.616897e-07, 0.28383976, -4.577637e-07)
bones/13/rotation = Quaternion(0.106903546, 0.4234476, 0.5169937, 0.7361937)
bones/13/scale = Vector3(0.99999994, 1.0000001, 1)
bones/14/position = Vector3(8.118432e-08, 0.32878014, 6.400201e-08)
bones/14/rotation = Quaternion(-0.38214406, -0.013688937, 0.2509969, 0.8892576)
bones/14/scale = Vector3(1, 1, 1)
bones/15/position = Vector3(-5.6267034e-08, 0.33805802, 2.7844428e-07)
bones/15/rotation = Quaternion(0.2442808, -0.028219983, 0.19281268, 0.9499231)
bones/15/scale = Vector3(0.99999994, 1.0000001, 0.99999994)
bones/16/position = Vector3(-0.06923417, 0.10397332, -0.013374915)
bones/16/rotation = Quaternion(-0.61417276, 0.46245825, -0.30934367, -0.55967027)
bones/16/scale = Vector3(1, 1.0000002, 1.0000002)
bones/17/position = Vector3(-2.0800938e-07, 0.28241324, 3.493237e-09)
bones/17/rotation = Quaternion(0.43518123, -0.42996484, -0.25984555, 0.7471465)
bones/17/scale = Vector3(1, 1.0000002, 1.0000001)
bones/18/position = Vector3(-9.514187e-08, 0.321968, -9.341488e-09)
bones/18/rotation = Quaternion(-0.5377174, 0.024481293, -0.3822374, 0.7511028)
bones/18/scale = Vector3(1, 0.99999994, 1)
bones/19/position = Vector3(-1.2009744e-07, 0.33331162, -6.3988196e-08)
bones/19/rotation = Quaternion(0.008421413, 0.24378517, 0.021994155, 0.9695432)
bones/19/scale = Vector3(1.0000001, 0.9999999, 0.9999999)
bones/20/position = Vector3(-0.0020213153, 0.14026234, 0.025355177)
bones/20/rotation = Quaternion(0.01733755, -0.13731311, 0.07973017, 0.98716146)
bones/20/scale = Vector3(0.9999999, 1.0000001, 1.0000001)
bones/21/position = Vector3(3.6934393e-09, 0.08011282, -5.8393432e-08)
bones/21/rotation = Quaternion(0.24952902, -0.085815005, 0.037913304, 0.9638121)
bones/21/scale = Vector3(1, 0.9999999, 1)
bones/22/position = Vector3(-0.003803481, 0.2711078, -0.15347809)
bones/22/rotation = Quaternion(-0.2547123, -5.965033e-08, 0.0063125584, 0.96699625)
bones/22/scale = Vector3(0.99999994, 1.0000001, 1.0000001)
bones/23/position = Vector3(0.003803463, 0.073581554, 0.1534778)
bones/23/rotation = Quaternion(0.5326586, 1.5102553e-07, -0.013200041, 0.8462273)
bones/23/scale = Vector3(1.0000001, 1.0000001, 0.99999994)
[node name="BoneAttachment3D" type="BoneAttachment3D" parent="Armature/Skeleton3D" index="1" unique_id=746253482]
transform = Transform3D(0.76380855, 0.6409133, 0.07634032, 0.37153888, -0.5333008, 0.7599669, 0.52778554, -0.5521055, -0.6454634, -0.19746971, -0.54493994, 0.8692264)
bone_name = "RightHand"
bone_idx = 19
[node name="orcish_axe" parent="Armature/Skeleton3D/BoneAttachment3D" index="0" unique_id=870862107 instance=ExtResource("2_w57cj")]
transform = Transform3D(0.77727157, 0.5887542, 0.22185123, 0.60610914, -0.6061089, -0.5150379, -0.16876489, 0.5347904, -0.8279598, -0.053, 0.085, -0.75)
[gd_scene format=3 uid="uid://cx4vbc5m3myqk"]
[ext_resource type="Script" uid="uid://daq4ko8ryry3w" path="res://src/entities/units/base_unit.gd" id="1_lmwk6"]
[ext_resource type="PackedScene" uid="uid://dh00osxx32ll" path="res://src/entities/units/guardian/guardian.tscn" id="2_soqit"]
[ext_resource type="PackedScene" uid="uid://bablnjk1ikcpt" path="res://assets/models/items/weapons/azure_spear/azure_spear.fbx" id="3_pm8px"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_body"]
radius = 0.4
height = 1.2
[sub_resource type="CapsuleMesh" id="CapsuleMesh_unit"]
radius = 0.4
height = 1.2
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ring"]
albedo_color = Color(0.098039, 0.901961, 0.098039, 1)
emission_enabled = true
emission = Color(0.098039, 0.901961, 0.098039, 1)
emission_energy_multiplier = 2.0
[sub_resource type="TorusMesh" id="TorusMesh_selection"]
material = SubResource("StandardMaterial3D_ring")
inner_radius = 0.65
outer_radius = 0.7
[node name="GuardianUnit" type="CharacterBody3D" unique_id=2140150158]
script = ExtResource("1_lmwk6")
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1623768716]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6, 0)
shape = SubResource("CapsuleShape3D_body")
[node name="VisualMesh" type="MeshInstance3D" parent="." unique_id=506359796]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6, 0)
visible = false
mesh = SubResource("CapsuleMesh_unit")
[node name="SelectionRing" type="MeshInstance3D" parent="." unique_id=1020833698]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.02, 0)
mesh = SubResource("TorusMesh_selection")
[node name="NavigationAgent3D" type="NavigationAgent3D" parent="." unique_id=1893995123]
[node name="guardian" parent="." unique_id=1303946976 instance=ExtResource("2_soqit")]
[node name="Skeleton3D" parent="guardian/Armature" parent_id_path=PackedInt32Array(1303946976, 42386791) index="0" unique_id=1547704068]
bones/0/rotation = Quaternion(0.16135524, 0.017289262, 0.8635694, -0.47740287)
bones/1/rotation = Quaternion(-0.11989136, -0.7847894, 0.48965573, 0.360512)
bones/2/rotation = Quaternion(0.30723146, 0.028167723, 0.019137163, 0.95102537)
bones/3/rotation = Quaternion(-0.48467338, -0.009461789, 0.084976375, 0.8705062)
bones/4/rotation = Quaternion(-0.44517812, -0.036251303, 0.0022491806, 0.8947051)
bones/5/rotation = Quaternion(-0.55861735, -0.34589392, 0.52776814, 0.53829813)
bones/6/rotation = Quaternion(0.24396187, -0.052610878, -0.041842297, 0.96745235)
bones/7/rotation = Quaternion(-0.51089776, 0.016207077, -0.10428674, 0.8531384)
bones/8/rotation = Quaternion(-0.46007094, 0.05177691, -0.0002939275, 0.8863712)
bones/9/rotation = Quaternion(0.51449835, 0.55558264, 0.55473185, 0.34480736)
bones/10/rotation = Quaternion(-0.010586703, 0.039760113, 0.028165929, 0.9987561)
bones/11/rotation = Quaternion(-0.044285484, -0.0022858628, 0.0065958304, 0.9989946)
bones/12/rotation = Quaternion(0.4713875, 0.61777264, -0.43904644, 0.45098686)
bones/13/rotation = Quaternion(0.515525, 0.4640335, 0.11964494, 0.71034634)
bones/14/rotation = Quaternion(-0.12525696, -0.120365754, 0.08248928, 0.98133504)
bones/15/rotation = Quaternion(-0.0055409265, -0.027728662, 0.026517618, 0.99924845)
bones/16/rotation = Quaternion(-0.47947365, 0.60535425, -0.38794234, -0.5031422)
bones/17/rotation = Quaternion(0.5574216, -0.17528728, -0.09270607, 0.80620176)
bones/18/rotation = Quaternion(-0.20086025, 0.21941167, -0.43810183, 0.84828097)
bones/19/rotation = Quaternion(0.042692166, -0.32304475, 0.07524356, 0.9424214)
bones/20/rotation = Quaternion(0.050158884, 0.06416708, 0.02680122, 0.9963174)
bones/21/rotation = Quaternion(0.38534346, 0.030087095, -0.03150925, 0.9217442)
bones/22/rotation = Quaternion(-0.16659413, -3.229459e-09, 0.002792912, 0.98602164)
bones/23/rotation = Quaternion(0.5757769, -4.7371287e-08, -0.0096528055, 0.81755)
[node name="BoneAttachment3D" type="BoneAttachment3D" parent="guardian/Armature/Skeleton3D" index="1" unique_id=673201182]
transform = Transform3D(0.5572412, -0.70306987, 0.44178396, -0.8238535, -0.53455627, 0.18845147, 0.10366359, -0.4689782, -0.87710446, -0.40996584, -0.04638289, 0.99486864)
bone_name = "RightHand"
bone_idx = 19
[node name="azure_spear" parent="guardian/Armature/Skeleton3D/BoneAttachment3D" unique_id=266001409 instance=ExtResource("3_pm8px")]
[editable path="guardian"]
...@@ -9,6 +9,19 @@ var _is_avatar_active: bool = false ...@@ -9,6 +9,19 @@ var _is_avatar_active: bool = false
var _original_damage: float = 0.0 var _original_damage: float = 0.0
var _original_scale: Vector3 = Vector3.ONE var _original_scale: Vector3 = Vector3.ONE
# 드워프의 Attack 클립은 원본 길이가 길기 때문에 공통 BaseUnit 기본값으로는
# 모션이 너무 빨리 끊깁니다. 쿨다운 안에서 거의 한 번의 타격 동작이 완성되도록
# 락 시간과 재생 속도를 드워프 전용으로 보정합니다.
const DWARF_ATTACK_ANIM: String = "Attack"
const DWARF_RUN_ANIM: String = "Running"
const DWARF_WALK_ANIM: String = "Walking"
const DWARF_IDLE_ANIM: String = "Idle"
const DWARF_ATTACK_LOCK_RATIO: float = 0.9
const DWARF_ATTACK_DAMAGE_RATIO: float = 0.48
const DWARF_MIN_ATTACK_LOCK: float = 0.65
const DWARF_MIN_ATTACK_PLAY_SPEED: float = 1.0
const DWARF_MAX_ATTACK_PLAY_SPEED: float = 4.0
func _setup_unit_visuals() -> void: func _setup_unit_visuals() -> void:
# 자식 노드 중 드워프 3D 모델 노드 이름을 명시하여 인스턴스를 확보합니다. # 자식 노드 중 드워프 3D 모델 노드 이름을 명시하여 인스턴스를 확보합니다.
var m_name: String = "dwarf" var m_name: String = "dwarf"
...@@ -28,6 +41,36 @@ func _setup_unit_visuals() -> void: ...@@ -28,6 +41,36 @@ func _setup_unit_visuals() -> void:
if _model_anim_player: if _model_anim_player:
print("DwarfHero: Linked embedded model & AnimationPlayer: ", m_name) print("DwarfHero: Linked embedded model & AnimationPlayer: ", m_name)
## 드워프의 기본 공격 처리
## - BaseUnit의 기본 공격 계산은 "dwarf/Slash" 같은 일반 유닛 애니메이션을 찾으므로,
## 드워프 전용 "Attack" 클립 길이를 기준으로 공격 락과 데미지 판정 시간을 다시 맞춥니다.
func _try_attack() -> void:
if _attack_timer > 0.0 or not _target_monster:
return
_attack_timer = unit_data.cooldown
_show_attack_visual()
# 실제 Attack 애니메이션 길이와 현재 쿨다운을 함께 보아 모션 유지 시간을 계산합니다.
# 쿨다운 전체를 락으로 쓰지 않고 약간의 회복 구간을 남겨 다음 공격이 딱딱 끊기지 않게 합니다.
_attack_lock_timer = _get_dwarf_attack_lock_duration()
var target_ref: Node3D = _target_monster
var damage_amount: float = unit_data.damage
var damage_delay: float = _attack_lock_timer * DWARF_ATTACK_DAMAGE_RATIO
# 도끼가 몸 앞쪽으로 떨어지는 구간에 데미지가 들어가도록 지연시켜 시각적 타격감과 판정을 맞춥니다.
if damage_delay > 0.0:
get_tree().create_timer(damage_delay).timeout.connect(
func() -> void:
if is_instance_valid(target_ref) and not target_ref.get("is_dead"):
if target_ref.has_method("take_damage"):
target_ref.call("take_damage", damage_amount)
)
else:
if target_ref.has_method("take_damage"):
target_ref.call("take_damage", damage_amount)
## 드워프 영웅 애니메이션 갱신 제어 ## 드워프 영웅 애니메이션 갱신 제어
func _update_animations() -> void: func _update_animations() -> void:
if not _model_anim_player: if not _model_anim_player:
...@@ -41,21 +84,19 @@ func _update_animations() -> void: ...@@ -41,21 +84,19 @@ func _update_animations() -> void:
if has_custom_anims: if has_custom_anims:
# fbx 내장 애니메이션 이름 매핑 (Attack, Running, Idle) # fbx 내장 애니메이션 이름 매핑 (Attack, Running, Idle)
var attack_anim: String = "Attack" var attack_anim: String = DWARF_ATTACK_ANIM
var run_anim: String = "Running" var run_anim: String = DWARF_RUN_ANIM
var idle_anim: String = "Idle" var walk_anim: String = DWARF_WALK_ANIM
var idle_anim: String = DWARF_IDLE_ANIM
# 1. 공격 중일 때 (공격 선딜/모션 락 타이머가 작동 중인 경우) # 1. 공격 중일 때 (공격 선딜/모션 락 타이머가 작동 중인 경우)
if _attack_lock_timer > 0.0: if _attack_lock_timer > 0.0:
var base_speed: float = 1.2 play_speed = _get_dwarf_attack_play_speed()
if unit_data and unit_data.cooldown < 0.6:
base_speed = 0.6 / unit_data.cooldown
play_speed = clampf(base_speed, 1.0, 3.0)
target_anim = attack_anim target_anim = attack_anim
blend_time = 0.1 blend_time = 0.08
# 2. 이동 중일 때 (속도 벡터 크기가 0.1보다 클 경우) # 2. 이동 중일 때 (속도 벡터 크기가 0.1보다 클 경우)
elif velocity.length() > 0.1: elif velocity.length() > 0.1:
target_anim = run_anim target_anim = walk_anim
play_speed = 1.1 play_speed = 1.1
# 3. 그 외 기본 대기 상태일 때 # 3. 그 외 기본 대기 상태일 때
else: else:
...@@ -83,6 +124,32 @@ func _update_animations() -> void: ...@@ -83,6 +124,32 @@ func _update_animations() -> void:
if target_anim != "" and _model_anim_player.current_animation != target_anim: if target_anim != "" and _model_anim_player.current_animation != target_anim:
_model_anim_player.play(target_anim, blend_time, play_speed) _model_anim_player.play(target_anim, blend_time, play_speed)
## 현재 로드된 드워프 Attack 애니메이션 길이를 반환합니다.
## - 애니메이션 리소스가 아직 준비되지 않은 예외 상황에서도 안정적으로 동작하도록 기본값을 둡니다.
func _get_dwarf_attack_anim_length() -> float:
if _model_anim_player and _model_anim_player.has_animation(DWARF_ATTACK_ANIM):
return _model_anim_player.get_animation(DWARF_ATTACK_ANIM).length
return 2.8
## 실제 공격 모션을 유지할 논리 타이머 값을 계산합니다.
## - BaseUnit에서 attack_speed_mult로 타이머를 빨리 줄이므로, 여기서는 기본 쿨다운 기준 값을 설정합니다.
func _get_dwarf_attack_lock_duration() -> float:
if not unit_data:
return DWARF_MIN_ATTACK_LOCK
var cooldown_lock: float = unit_data.cooldown * DWARF_ATTACK_LOCK_RATIO
var clamped_lock: float = maxf(DWARF_MIN_ATTACK_LOCK, cooldown_lock)
return minf(clamped_lock, unit_data.cooldown)
## 공격 락이 끝날 때쯤 Attack 클립도 자연스럽게 마무리되도록 재생 속도를 계산합니다.
## - 가속 버프는 타이머를 빠르게 줄이므로 재생 속도에도 같은 배율을 반영합니다.
func _get_dwarf_attack_play_speed() -> float:
var anim_length: float = _get_dwarf_attack_anim_length()
var lock_duration: float = maxf(_get_dwarf_attack_lock_duration(), 0.01)
var effective_lock_duration: float = lock_duration / maxf(attack_speed_mult, 0.01)
var target_speed: float = anim_length / effective_lock_duration
return clampf(target_speed, DWARF_MIN_ATTACK_PLAY_SPEED, DWARF_MAX_ATTACK_PLAY_SPEED)
# ========================================== # ==========================================
# 영웅 고유 스킬 실구현 # 영웅 고유 스킬 실구현
# ========================================== # ==========================================
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
[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
...@@ -61,33 +60,4 @@ mesh = SubResource("TorusMesh_fcx2y") ...@@ -61,33 +60,4 @@ 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"]
...@@ -91,7 +91,9 @@ static func attach_weapon(model_instance: Node3D, unit_data: UnitData) -> void: ...@@ -91,7 +91,9 @@ static func attach_weapon(model_instance: Node3D, unit_data: UnitData) -> void:
attachment_name = "RightHandAttachment" attachment_name = "RightHandAttachment"
weapon_scene_path = "res://assets/models/items/weapons/orcish_axe/orcish_axe.glb" 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" texture_path = "res://assets/models/items/weapons/orcish_axe/orcish_axe_Baked_BaseColor.png"
# 도끼를 오른손에 자연스럽게 맞추는 회전/위치 오프셋
weapon_position = Vector3(-0.05, 0.085, -0.75)
weapon_rotation = Vector3(31, 165, 135)
# 지정된 본이 존재하는지 확인 # 지정된 본이 존재하는지 확인
var bone_idx: int = skeleton.find_bone(bone_name) var bone_idx: int = skeleton.find_bone(bone_name)
if bone_idx == -1: if bone_idx == -1:
......
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