-
-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
I've found this project incredibly helpful for building the mobile/touch camera input for my 3D project. I wanted to use the SingleTouch/SingleTap events for selecting objects in the scene howevever the events don't appear to propogate through to the CollisionObject
input_event
signal.
https://docs.godotengine.org/en/stable/classes/class_collisionobject.html
I've had a look through the Readme here and also at the Godot documentation, there doesn't appear to be a simple way to enable this.
Here's two ideas on how this could be achieved:
- emit a raycast from the primary camera whenever these events are triggered and then call
_input_event
on the collider. - provide a helper function for converting the Godot touch events inside of a
_input_event
handler (leveraging the existing raycasts), for example:
func _on_input(camera, event, position, normal, shape_idx):
var gestures = InputGestureEvents(event)
for gesture in gestures:
// handle events
Federico-Ciuffardi
Metadata
Metadata
Assignees
Labels
No labels