immersive-home/app/lib/events/event_pointer.gd

10 lines
350 B
GDScript3
Raw Permalink Normal View History

2023-11-27 01:23:19 +02:00
extends EventBubble
2024-03-17 01:14:31 +02:00
## Triggered when the raycast of the controller or hand hits or clicks on an object.
2023-11-27 01:23:19 +02:00
class_name EventPointer
2024-03-17 01:14:31 +02:00
const Initiator = preload ("res://lib/utils/pointer/initiator.gd")
2023-11-27 01:23:19 +02:00
2024-03-17 01:14:31 +02:00
## Either the controller or the hand that triggered the event.
2023-11-27 01:23:19 +02:00
var initiator: Initiator
2024-03-17 01:14:31 +02:00
## The raycast that collided with the target.
2023-11-27 01:23:19 +02:00
var ray: RayCast3D