#Collisions between nodes parented under a subviewport and nodes outside of it - 2D

1 messages · Page 1 of 1 (latest)

old shard
#

Hi, I wrote a similar question in quick help but to no avail so posting here.
I need to have some rigidbodies under a subviewport because I need to apply a color based shader that wouldn't work with all the other elements.
The problem is that when the nodes are under a subviewport, they don't collide anymore with other static bodies and rigidbodies. Is it by design that nodes under a subviewport can only physically interact with other nodes under the same subviewport or am I doing something wrong?

meager steppe
old shard
#

Mmm... I tried it but the shaders in the subviewport are now applied to all nodes, which defeat the purpose of using the subviewport

old shard
#

So I tried to assign the same world_2D to the subviewport, and I have the same interactions but then I also have the same rendering applied to everything. It seems I can't find a way to separate visual rendering and physics.

fallow sentinel
#

Would it work to put the shader on a separate layer with these particular nodes?

#

I assume you're using a TextureRect and a screen reading shader, is that right? It might work to put the TextureRect on a different visual layer along with the relevant objects. Everything would be part of a single viewport, and you'd want to make sure the viewport was set to render all layers