immersive-home/app/lib/utils/pointer/initiator.gd
2024-03-16 01:16:08 +01:00

22 lines
325 B
GDScript

extends RefCounted
enum Type {
CONTROLLER_LEFT,
CONTROLLER_RIGHT,
HAND_LEFT,
HAND_RIGHT,
}
enum EventType {
GRIP,
TRIGGER,
}
signal on_press(type: EventType)
signal on_release(type: EventType)
var node: Node3D
var type: Type
func is_right() -> bool:
return type == Type.CONTROLLER_RIGHT || type == Type.HAND_RIGHT