12 lines
308 B
GDScript3
12 lines
308 B
GDScript3
|
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)
|