Armazon/scripts/camera_rumble.gd

13 lines
331 B
GDScript3
Raw Normal View History

2024-01-28 13:44:54 -05:00
extends Node
signal grab()
2024-05-03 19:47:22 -04:00
signal nuclear_blast()
2024-01-28 13:44:54 -05:00
@onready var rumble: float = 0
@onready var holding: bool = false
func get_mouse_pos() -> Vector3:
var cam: Camera3D = get_viewport().get_camera_3d()
var mousePos: Vector2 = get_viewport().get_mouse_position()
return cam.project_position(mousePos, cam.global_position.z - 1)