I would like the model to be properly rendered in front/back of my other nodes, e.g. I have multiple characters walking around that can be dynamically added/removed and brought to front by clicking on them.
I want cubism model to behave like this too but seems like the model class uses z-index for body parts to handle the correct draw order. This makes it hard to place cubism models into my nodes hierarchy since they can have arbitrary number of meshes, z-indexes won't be consistent and body parts from different models partially overlap too
I'm not very familiar with the implementation but would it be possible to sort nodes order to handle draw order instead of setting z-index for each body part?
The only workaround is probably to use a separate viewport for rendering each character, but with viewports I'm concerned about performance, especially in case if there are multiple characters. I also tried to use CanvasGroup but seems like it doesn't handle z-index properly too in this situation

I would like the model to be properly rendered in front/back of my other nodes, e.g. I have multiple characters walking around that can be dynamically added/removed and brought to front by clicking on them.
I want cubism model to behave like this too but seems like the model class uses z-index for body parts to handle the correct draw order. This makes it hard to place cubism models into my nodes hierarchy since they can have arbitrary number of meshes, z-indexes won't be consistent and body parts from different models partially overlap too
I'm not very familiar with the implementation but would it be possible to sort nodes order to handle draw order instead of setting z-index for each body part?
The only workaround is probably to use a separate viewport for rendering each character, but with viewports I'm concerned about performance, especially in case if there are multiple characters. I also tried to use CanvasGroup but seems like it doesn't handle z-index properly too in this situation