Armazon/scripts/camera_rumble.gd

12 lines
308 B
GDScript3
Raw Normal View History

2024-01-28 13:44:54 -05:00
extends Node
signal grab()
@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)