Godot Version
4.4
Question
I have this setup where I spawn some objects as children of a SubViewport (with transparent background), because I have a ShaderMaterial on it that should affect only objects inside that SubViewport.
However, I’d like to have these objects to collide with other nodes, but from my understanding, they will collide only with other nodes under the same SubViewport.
My current setup - Droplets are being spawned dynamically, Sprite2D2 is just a placeholder node to check if sprite outside SubViewport is not affected by the ShaderMaterial (and it’s not, yaay) and StaticBody2D is a node that I’d like to have outside that SubViewport:
This makes a little mess in my nodes hierarchy, since for collisions I’d have to place all my nodes under the SubViewport, where I only need some specific ones. If I move the StaticBody2D outside the SubViewport, then (unsurprisingly) the droplets don’t collide with it.
I’m not a shader expert, so maybe it’s just my approach that’s wrong here?