How to draw bounding box that only shows visible edges?

Here’s the basic demo for drawing a bounding box.

The sphere is in front of some of the edges, yet those edges are still visible, as though the sphere is transparent. How do I make the bounding box only draw the portions of edges that are actually visible from the camera’s perspective?

You can set showBackLines to false like this. :slight_smile:

4 Likes