WIP: Modifying the client node

This commit is contained in:
2025-02-17 13:57:31 +01:00
parent 687c2ae1f5
commit 1323dbf154
19 changed files with 906 additions and 41 deletions

View File

@ -0,0 +1,21 @@
extends Node3D
class_name CameraMount
# -- When camera mount is not active, client shouldn't connect to it
@export var active: bool = false
@export var default: bool = false
var camera: Camera3D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
camera = Camera3D.new()
add_child(camera)
@rpc("any_peer", "call_local", "reliable")
func connect_to_camera() -> void :
if active:
camera.make_current()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass

View File

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://316q8oy76ev1"]
[ext_resource type="Script" path="res://scenes/utils/camera_mount/camera_mount.gd" id="1_5dtrj"]
[node name="CameraMount" type="Node3D"]
script = ExtResource("1_5dtrj")