WIP: Spawn bullets on the server and sync them

This commit is contained in:
2025-01-26 20:20:15 +01:00
parent c2a5f9cf1c
commit 24914cb6fa
8 changed files with 17 additions and 7 deletions

View File

@ -16,10 +16,11 @@ func _process(delta: float) -> void:
func _on_head_collision_body_part_hit(dam: Variant) -> void:
print("head is hit" + str(dam))
#owner_placeholder.take_damage(dam)
print(owner_placeholder)
owner_placeholder.take_damage(dam)
pass # Replace with function body.
func _get_owner() -> CharacterBody3D:
var owner_placeholder := find_parent("CharacterPlaceholder")
var owner_placeholder := find_parent("PlayerPlaceholder*")
return owner_placeholder

View File

@ -1344,7 +1344,7 @@ surface_material_override/0 = SubResource("StandardMaterial3D_j3emx")
[node name="HitCollisions" type="Node3D" parent="Body/Armature/Skeleton3D"]
[node name="BoneAttachment3D" type="BoneAttachment3D" parent="Body/Armature/Skeleton3D"]
transform = Transform3D(0.978017, -0.176546, -0.110973, 0.15839, 0.282801, 0.946011, -0.135631, -0.942791, 0.304547, -11.8203, 17.7472, -135.936)
transform = Transform3D(0.978017, -0.176546, -0.110972, 0.15839, 0.282801, 0.94601, -0.135631, -0.942791, 0.304547, -11.8203, 17.7472, -135.936)
bone_name = "mixamorig_Head"
bone_idx = 5

View File

@ -1,6 +1,6 @@
extends Area3D
@export var damage: int = 100
@export var damage: int = 20
signal body_part_hit(dam)
# Called when the node enters the scene tree for the first time.