Thank you for your advice!
I was afraid I would run into problems but actually swapping materials in runtime totally did the job. This works for me since I have only one rive model in my game (the player) but it is a severely limited workaround in a scenario where multiple rive models have to interact. I’ll explain briefly in case anyone wonders how to do :
- Create render predicates (render.predicate() in your init function) in your render script that is drawn (render.draw() in the update function) before/after the rive model.
- Copy-paste the relevant material (typically the sprite material) and set their tags accordingly to the predicates you created
- Use resource.material in a go.property() to get those materials in a script attached to your object
- Compare the position y value to the one of the rive model and swap to display the object behind or above the rive model