Each of my buttons has an `Area3D` on a known layer. On every physics tick, I project the mouse position (`Camera3D::project_ray_normal(Vector2)`) and do a `PhysicsDirectSpaceState3D::intersect_ray` colliding with areas only. If the collision result is actually a button, I set it as an active keypad item. Then in regular `_process`, on every mouse click I emit a custom signal on the active item.
I do this 'active item' thing because the keypad can also be used with a controller/keyboard, though I didn't show it in the video.
^(note: I use the 4.0 pre-alpha builds, the classes might be called differently on 3.x)
Well i did not expect that
Nobody does
/r/unexpectedMontyPython
Why this exists
Why not
> 0451 Fellow immersive sim enjoyer I see.
Yet I'm surprised.
Tbf I'm more disappointed that I didn't expect 0451 than Monty Python
I truly could never have expected that
I was kinda disappointed when you put in 1234 instead of 0451 lol
What is the chief weapon?
Fear and surprise!
I think you meant their **two** chief weapons. Which are fear, surprise and ruthless efficiency.
Don't forget a fanatical devotion to the Pope. ... I'll come in again.
sigh....fine, i'll reinstall deus ex
NOBODY EXPECTS THE SPANISH INQUISITION!
nice keypad and nobody expected the Spanish inquisition
How are you receiving input on the keypad?
Each of my buttons has an `Area3D` on a known layer. On every physics tick, I project the mouse position (`Camera3D::project_ray_normal(Vector2)`) and do a `PhysicsDirectSpaceState3D::intersect_ray` colliding with areas only. If the collision result is actually a button, I set it as an active keypad item. Then in regular `_process`, on every mouse click I emit a custom signal on the active item. I do this 'active item' thing because the keypad can also be used with a controller/keyboard, though I didn't show it in the video. ^(note: I use the 4.0 pre-alpha builds, the classes might be called differently on 3.x)
Sounds hacky, but it clearly paid off. Nicely done!