Fix the aiming and bullet creation

This commit is contained in:
2025-02-01 18:03:00 +01:00
parent 33f1d57a50
commit bd91818682
19 changed files with 334 additions and 8089 deletions

View File

@ -7,6 +7,7 @@ class_name PlayerPlaceholder
@onready var client_node: CharacterBody3D = $PlayerControlledNode
@onready var server_node: PlayerServerNode = $ServerControlledNode
@export var character_speed: int = 5
@onready var bullet_starting_poing: Node3D = $ServerControlledNode/BulletStartingPoint
@ -109,7 +110,5 @@ func adjust_rotation(x: float, y: float, z: float):
push_warning("player rotation is not valid, adjusting")
client_node.rotation = desired_rotation
func is_vector_a_lower_than_b(vec_a: Vector3, vec_b: Vector3) -> bool:
return vec_a.x < vec_b.x and vec_a.y < vec_b.y and vec_a.z < vec_b.z