Best way to fit an camera inside a cube
I've been trying for a few days to create a perspective Camera that will always be axis aligned, can zoom in and out, and will scroll left and right, but should never extend past the bounds of the model.
I'm rusty on my Matrix math, but I'm basically trying to get the Left, Right, Top, and Bottom values for the depth where my level is drawn according to the current view and projection. Where my camera can be at a variable Z coordinate in front of the level.
It's in XNA, but I should be able to understand a loose concept.
I've been trying for a few days to create a perspective Camera that will always be axis aligned, can zoom in and out, and will scroll left and right, but should never extend past the bounds of the model.
I'm rusty on my Matrix math, but I'm basically trying to get the Left, Right, Top, and Bottom values for the depth where my level is drawn according to the current view and projection. Where my camera can be at a variable Z coordinate in front of the level.
It's in XNA, but I should be able to understand a loose concept.
No comments:
Post a Comment