Noob Question?

i read the thread: and i have the following question:

Suppose I have a node called nodeScene, I add an image to that node, then I add another node called nodeModel. This new node has a spatial (model).

How I can assign the order in which they appear? for example the image should go as background and the model ahead of the image.

I tried with the information in this thread:

but I get an error and the application closes

Uploaded with

Well with that error, you are adding something to the scene outside of the update (render) loop. Make sure when you add something to the scene it is on the render loop.

You will have to describe more of what you are trying to achieve. Just a background image doesn’t mean too much. Do you want a skybox? A stationary background image in 2d with 3d in front of it?

@Sploreg said:
You will have to describe more of what you are trying to achieve.

I'm trying to make a 2D scene, one image as background and a model in front of the image.

this is an example of what i'm trying to do, made with skybox and a model:

Uploaded with

I think you’ve created your own viewport but then you don’t manage it properly. There are some spatial update methods that need to be called on the ViewPort’s spatial at the right time. If you never change what’s in the viewport then you may only need to call them once.

You can also search for ViewPortState… because I’ve posted an AppState that can manage viewports at least once.

Please don’t double-post.