Hello everyone. I built my project using the staple rendercam plugin in combination with the Rive technology. In previous versions I easily managed to create a render script that worked perfectly with both, however it seems that recent changes in Rive broke it.
These are the lines I include in my update function to render the rive predicate.
render.enable_state(render.STATE_STENCIL_TEST)
render.set_projection(rive.get_projection_matrix())
render.set_viewport(0, 0, render.get_window_width(), render.get_window_height())
render.draw(self.rive_pred)
A number of problems appear with these
- The rivemodel is rendered at the wrong place at the wrong scale, even when “coordinates system” is set to “fullscreen”
- The set_projection() and set_viewport() methods don’t seem to do anything. I can remove them and nothing visibly changes.
- All predicates that comes after (notalby a separate material that I use to render sprites in front of the rive model) stop being rendered when the rive predicate is rendered. If I remove the rive draw() call they appear back
- Note that I do have objects parented to my rive model that render exactly where they should, meaning that my rivemodel is “physically” at the right place but is being rendered wrong.
I tried using the default rive render in the extension, right now I’m not even seeing the rive instance being rendered at the wrong place on the screen, I only see the gui and clear color.
So I’m asking you if you know about a way to keep using rendercam before I dive into refactoring everything with the default rive render.
Platform : Android (arm64)
Defold version : 1.10.1
Rive version : 4.0.2