I haven’t actually done any testing on this, but by reading the following excerpts from the documentation I assume this is possible:
A World class is defined as a
Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Spatial nodes register their resources into the current world.
A Viewport (of which you can have several) contains a World instance. In 3D
“A World can be set in a Viewport using the “world” property, and that will separate all children nodes of that Viewport from interacting with the parent Viewport’s World.”
“For 2D, each Viewport always contains its own World2D. This suffices in most cases, but in case sharing them may be desired, it is possible to do so by setting the Viewport’s World2D manually.”
Thank you for the reply! I appreciate it!
I’ve read the World description. What confuses me in World description a little bit is how to actually use that. I can see that any Spatial derivative has get_world() method. But I personally have troubles finding the way to actually create one instead of using the default one.
Is there any example for that?
Thank you again!
I don’t know how you would go about using a World instance on it’s own, someone with a better understanding of the engine than me would have to chime in on that one.
But couldn’t you just create several Viewport nodes (who will then instance worlds on their own?) Then you’d have separate hierarchies you could attach your Spatials to. As far as I know you don’t have to actually display viewports.
Not at all sure if this is the best or most efficient way of going about this, though.
Thank you! This makes sense for me. Even though it doesn’t look like the straightest way of doing things but at least it is worth to try that.