armies can movies

This commit is contained in:
oughtum 2024-08-16 23:59:49 +01:00
parent 909008457b
commit 91a908ca20
4 changed files with 25 additions and 11 deletions

View file

@ -2,18 +2,12 @@ class_name Arm extends Node3D
@onready var camera: Camera3D = $"../../Camera3D"
@onready var target: Marker3D = $Target
@onready var ik_skeleton: SkeletonIK3D = $Skeleton3D/SkeletonIK3D
@export var action: StringName
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
ik_skeleton.start()
func update_target_pos() -> void:
var mouse_pos: Vector2 = camera.get_window().get_mouse_position()
@ -28,4 +22,6 @@ func update_target_pos() -> void:
if collision == null: return
var arm_target_pos: Vector3 = collision["position"]
target.global_position = arm_target_pos
print(collision)
target.global_position.z = arm_target_pos.z
target.global_position.y = arm_target_pos.y