added sword cursor

This commit is contained in:
derek
2025-06-26 11:19:44 -05:00
parent abe877c5da
commit 78d8ab4b10
15 changed files with 152 additions and 14 deletions

View File

@@ -1,6 +1,9 @@
extends Node3D
@export var player : Player
func _process(delta: float) -> void:
var mouse_pos = MousePos.get_mouse_world_position(00001000)
if mouse_pos != null:
global_position = mouse_pos
global_position = Vector3(mouse_pos.x,.1,mouse_pos.z)
look_at(player.global_position, Vector3.UP)

View File

@@ -20,6 +20,9 @@ const STAMINA_REGEN_RATE = 10.0
const DODGE_STAMINA_COST = 30.0
const ATTACK_STAMINA_COST = 10.0
func _ready() -> void:
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
func _physics_process(delta: float) -> void:
stamina_regen(delta)
move_and_slide()