Better bullet sync
This commit is contained in:
@ -9,6 +9,7 @@ extends Node3D
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
set_multiplayer_authority(1)
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
@ -24,7 +25,6 @@ func _process(delta):
|
||||
if ray.is_colliding():
|
||||
var collider = ray.get_collider()
|
||||
if collider != null and collider.is_in_group("target"):
|
||||
print(";ala")
|
||||
ray.get_collider().hit(damage)
|
||||
rigid_body_3d.visible = false
|
||||
particles.emitting = true
|
||||
|
@ -33,10 +33,10 @@ size = Vector3(0.05, 0.05, 0.05)
|
||||
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_b8q4c"]
|
||||
properties/0/path = NodePath(".:position")
|
||||
properties/0/spawn = true
|
||||
properties/0/replication_mode = 2
|
||||
properties/0/replication_mode = 1
|
||||
properties/1/path = NodePath(".:rotation")
|
||||
properties/1/spawn = true
|
||||
properties/1/replication_mode = 2
|
||||
properties/1/replication_mode = 1
|
||||
|
||||
[node name="Bullet" type="Node3D"]
|
||||
script = ExtResource("1_th28m")
|
||||
@ -82,5 +82,6 @@ draw_pass_1 = SubResource("BoxMesh_mfkmi")
|
||||
|
||||
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
|
||||
replication_config = SubResource("SceneReplicationConfig_b8q4c")
|
||||
visibility_update_mode = 1
|
||||
|
||||
[connection signal="timeout" from="RigidBody3D/Timer" to="." method="_on_timer_timeout"]
|
||||
|
Reference in New Issue
Block a user