Draw a 2D bounding box around a randomly placed 3D model

Actually, there is a way straightforward way to do this in Panda; Panda allows you to pass an arbitrary node to the underlying function it uses to calculate bounds. It will then transform the vertices to that node’s coordinate space before calculating their bounds. So you can get the bounds in an arbitrary reference frame, by simply putting a desired transformation on a node and passing it as argument.

I’ll make some sample code and post it on this thread.