19 lines
586 B
GDScript
19 lines
586 B
GDScript
extends Node3D
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
pass # Replace with function body.
|
|
|
|
func set_inhand(weapon_name: String) -> void:
|
|
var inhand = Global.inhands[weapon_name].instantiate()
|
|
|
|
for n in $Body/ArmPivot/FrontArm/HandPoint.get_children(): n.queue_free()
|
|
|
|
$Body/ArmPivot/FrontArm/HandPoint.add_child(inhand)
|
|
|
|
inhand.position = Vector3.ZERO
|
|
inhand.rotation = Vector3.ZERO
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta: float) -> void:
|
|
$Body/FrontLeg.position.z = 2
|