Setting view/projection matrices?

Topics: User Forum
Jan 9, 2007 at 8:17 PM
OK, so by poking through the source I've figured out roughly how we're meant to use this library... very useful, but there should be some sort of brief example of how it can be used in an actual project (not just how to create a ModelViewer instance, which does everything behind-the-scenes :P)...

I've basically got it working now, but there's one element I still don't understand. In order to get my models to show up on the screen at all, I still have to iterate over every mesh in the models, and every effect in the meshes, setting the view and projection matrices on each, before calling controller.Draw(). Is there any way for me to just tell the controller what those two matrices should be? (Or am I missing something more obvious? Still very new to XNA...)

Thanks for your help, and thanks for the super-useful library!! :)
Coordinator
Jan 9, 2007 at 10:24 PM
The reason why there aren't more examples is because I haven't been able to get it to quite work on 360 yet. Debugging on 360 for a large amount of code can be difficult, especially when the behavior is different on 360 than it is on windows.
Coordinator
Jan 9, 2007 at 10:25 PM
The design decision was to make the controller handle the world matrix, and the user control the view/projection matrices. So, just as you do for unanimated models, you need to set up the view and projection for each effect in a model.