0 votes

In my game project i'm using viewport as a texture output, so i can manipulate texture with custom shader. Using it for making 2d metaballs. But when you use viewport node, the outside physics object can't interact with inside of the viewport because viewport means another world.
I was trying to understand viewport how create new world for manipulate viewport to instead of creating world using the default world. But i couldn't understand how it works, i was digging in source codes for 5-6 hours.
Can anyone help me to understand?

Also i found this but this way is a bit long and i couldn't understand how it works:

Sorry for my english.

asked Jan 22 in Engine by No_99 (12 points)

I would have thought you could assign the space property of World but this isn't possible. https://docs.godotengine.org/en/3.1/classes/class_world2d.html#class-world2d
You should either assign the same world as the global one, or do a feature request to have different visual world (aka scenario) while having the same physics world (aka space).
The only way I know of to do this right now is to not use nodes and use servers directly, or split scenes in two, but that's surely out of the question given the amount of work.

Please log in or register to answer this question.

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.