Two cameras : Object rendered only with other objects

Hi,

For that idea to use Objects to make Gui, I use
https://defold.com/manuals/render/

I copied “sprite.material” (and his two companion files) in a folder in my project, and changed the “Tags” in “ihm”.

In my main collection, that has already three objects :

  • camera, the “normal” camera and its script, that use on_input keys and wheel for moving and zooming).
  • The starfield creation object, that “factory” the Stars objects all around in various positions.
  • The cursor object and its script. Cursor script is also the central on_input for clickings.

I added an object, called Gui_Systeme. With :

  • A camera (the same than the normal one, with Auto and Ortho checked. All the same really. Even the name).
  • A script
  • A sprite, a big grey rectangle I want to use as background for my new “Object in Gui clothes”.

I copied the parts the page “render pipeline in defold” said (there is an error, by the way :

render.draw(predicates.model_pred)

should be :

    render.draw(predicates.model)

And then I add “ihm” in the predicates.

And here’s the drama :

If I put :

    render.draw(predicates.ihm)

with the other Objects (tiles and particles in your code), the grey boxe appear, but of course move with all the other objects (here’s the stars)

But if I put

    render.draw(predicates.ihm, camera_gui.frustum)

with the other Gui (here gui and text), the grey boxe don’t show. At all

Allowing the new camera (acquire and use) in its object script change nothing.

Does anybody understand what I can forgot ?
I have no error message.

Oh yes, yes, of course :
I changed the grey rectangle sprite’s material for the new one (If I didn’t, could never appears, of course).