0 votes

I want to draw multiple nodes to the same World2D.

I have multiple viewports that all share the same world 2D

Can I add a child to one arbitrary viewport (not just the one that owns the world) and have it display in another?

What if I set one world equal to another AFTER I add the node to the Viewport?

My use case: I have 2d sprites showing up in a 3d game. I have to put each 2d sprite in a viewport texture so that I can draw effects on top of it. However, in this way each sprite gets its own draw call and is immune to batching. I want to be able to draw all sprites to the same viewport texture so I can batch them, so I'm trying to find an easy way to do this.

Godot version 3.2.3
in Engine by (27 points)

1 Answer

0 votes
Best answer

NVM, looks like you CAN do this, but you have to re-add the child to the viewport when you change world_2d.

by (27 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.