How to set GLTF model transparent from inside

Hi,

I’m loading GLTF models into a scene but when the camera intersects with a model, it becomes possible to partially “see through” the body of the model.

I’ve attached a screenshot showing what occurs.

Is it possible to hide or set to transparent the GLTF model when seeing from inside? So that the above doesn’t occur anymore. I’ve tried setting the material to FrontSide but it didn’t appear to make any difference.

Thank You!

Is it possible to hide or set to transparent the GLTF model when seeing from inside?

Depending on the model, implementing something like this is can be very tricky. Can’t just just prevent the camera from passing into the model? E.g. by defining a bounding box around the character and then perform a collision detection test with your camera per frame?

I could add a collision detection but I have quite a lot of models within a scene and with other existing functions, I’m already seeing situations where mobile Safari really slows down or force reloads.

I was hoping there might be a “lite” way, maybe modifying mesh or material settings that wouldn’t require collision detections to solve this transparency issue.