If anyone has any insight on this, it would be greatly appreciated!
I've been experimenting in 3d with godot 4.2 lately, trying to implement various pieces of first person shooter interaction functionality I find interesting. I'm trying to basically create a "computer screen" within the game, that when the player is in front of it and hits the "interact" keybind on it, their mouse cursor will become visible, and be confined within the "computer screen", without changing the players perspective at all.
I'm using a viewport to display a series control nodes for a basic gui, and am using it as a ViewportTexture for a quad mesh.
When I hit the "interact" keybind, I toggle the mouse mode to visible.... This is pretty much as far as I ha ve gotten, since when the mouse_mode is visible, the CollisionShape3D that contains the viewport doesn't seem to receive any input signals, or mouse_entered / exited. I can put a script on the viewport to manually listen for the input, and I can see that the click events are positioned based on the main viewport (meaning, they are all Vector2's, not actually being represented in the 3d space). But I don't really know how to get those to register within it, i.e. clicking on the control nodes.
The only thing the scripts are doing is getting is listening for inputs and printing them out so I could try various methods, so nothing really substantial.
I based my node setup on the Viewport2Din3D node from the wonderful Godot XR Toolkit, although that one seems to handle the clicks from the vr controller by sending a Vector3 position as input, while mine is triggering 2d input events... maybe I will have to experiment with creating raycast that come out from the mouse position to emulate this.