Open jleibs opened 2 months ago
It looks like there are a few broken things going on here.
The code to generate a project matrix does not look like it matches the way 2D views work in general:
In particular resolution = [aspect_ratio, 1.0]
causes the image 2d bounds to be totally wrong for anything containing a real image as it will force the bounds to be 1 pixel wide.
Theoretically non-image content 3D should still project correctly, but I suspect we're invalidating some other assumption about units and scale in the renderer that causes the content to fail to project.
Lastly when the origin of the scene doesn't include a visualizer and it doesn't have any children we hit the codepath of it not being added to the view. This seems weird since the entity itself defines the bounds of the view. Introducing a 2D visualizer for Pinhole probably makes sense even if it's just something like a rectangle showing the FOV.
This seems pretty serious
Example code:
Results in:
Expected: should show the points projected into the camera frame.