WIP: Spawn bullets on the server and sync them
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user