X-Git-Url: http://git.purplebirdman.com/william-skin.git/blobdiff_plain/3b1bde10328fa48f1036205b9c5eb6cacb1b103a..3e74277bb1d2ad3f5ccdc26c690a0f6e37ffcd25:/test/test.gd diff --git a/test/test.gd b/test/test.gd index ac0fdee..71e4a2f 100644 --- a/test/test.gd +++ b/test/test.gd @@ -1,6 +1,9 @@ extends Node3D +@onready var player = $player + + func _input(event: InputEvent) -> void: if event.is_action_pressed("left_click"): Input.mouse_mode = Input.MOUSE_MODE_CAPTURED @@ -9,3 +12,10 @@ func _input(event: InputEvent) -> void: get_tree().quit() else: Input.mouse_mode = Input.MOUSE_MODE_VISIBLE + + +func _on_player_camera_lockon() -> void: + # Pass everything that's part of the lockon group to the player + # within a certain radius + var arr := get_tree().get_nodes_in_group("player-lockon") + player.set_camera_lockon(arr)