WIP: Spawn bullets on the server and sync them

This commit is contained in:
2025-01-26 18:18:35 +01:00
parent adce112be9
commit e28845b688
11 changed files with 1467 additions and 18 deletions

View File

@ -26,7 +26,13 @@ func _ready() -> void:
$MultiplayerSpawner.spawn(char)
players.add_child(char)
func spawn_bullet(position):
print("spawning a bullet")
var node: Node3D = ResourceLoader.load("res://scenes/weapon/bullet.tscn").instantiate()
node.position = position.global_position
node.transform.basis = position.global_transform.basis
$BulletSpawner.spawn(node)
$Bullets.add_child(node)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass