-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do we want to have Mouse Passtrough on Sprites / SubViewportSprite in Core? #6524
Comments
As I actually need this feature myself and it seems to be of reasonable complexity for a first time contributor, I'd like to try and do this on my own if you don't mind. |
Might be cleaner to have a dedicated: SubViewportSprite2D and SubViewportSprite3D to match SubViewportContainer functionality. But taking a ViewportTexture input, instead of requiring the viewport to be a direct child node. |
oooh so kind of how sprite2D and sprite 3D kind of are a parody, while not quite inheriting from each other. When first reading this, I kind of got tangled in trying to imagine the inheritance. yeah, that'd be nice actually. |
Related to #4093 I have created a Godot4-Project, that showcases how to implement this in GDScript: godotengine/godot#72657 (comment) |
okay, that still needs some amount of code to work to automatically generate all the required components together (as well as billboard support, witch would be nice) and stuff, but it makes it more feasible to do as an Add-On. It still seems a bit fundamental to not have it in core, but as @TheDuriel pointed out: you'd kind of have to add two more Classes to make it consistent with the rest of Godot and then we have 2 more components and if we need anything it's maybe reducing the amount of those. 😬 I can use the Demo Project to solve my own Issue for now and will still be happy to have that as my first contribution to Core if that would make people happy. |
Updated initial Issue to reflect state of Discuission |
Describe the project you are working on
A 3D room you walk trough. Users can find mementos in that environment and interact with 3D/objects via a 2D overlay.
Alternatively:
A Game, that has a Computer Panel to interact with.
Describe the problem or limitation you are having in your project
While it is possibe - and there has been a Godot 3.5 Project, that demonstrates this to pass mouse events trough to a view-port Texture, it is a substantial hassle to do so with godot script.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
A "click pass-trough" option on a sprite (3D and 2D) that allows mouse events to be passed trough to a view-port that is used as a texture in a spite.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
SubViewportSprite2D
andSubViewportSprite3D
that inherit fromSprite2D/3D
and parody the features ofSubViewportContainer
If this enhancement will not be used often, can it be worked around with a few lines of script?
It has been demonstrated, that it can be done with a reasonable amount work. So the question if this belongs to core now is more one of Convenience and Consistency.
Is there a reason why this should be core and not an add-on in the asset library?
SubViewportContainer
feels like a thing that should exist for consistency-sakeThe text was updated successfully, but these errors were encountered: