whats better or easier?
When you have mouse controls, or any controls for that matter, is it better to have the mouse rotate the camera or have the mouse rotate the enviroment and objects to give the appearence of the camera rotating? I am just using rotating as an example, I do mean movement in general.
Conceptually, its easier (for me at least) to think in terms of the camera moving around. You have a Camera Position and an Aim Point and thats just two discrete points to move to and fro.
You can transform the environment without altering its data using the world transform, which can rotate, scale, displace, etc. But that matrix will be entangled with the transforms you use for the different elements of your scene graph.
A lot of the samples in the DirectX SDK use an effect that does a world transform to implement camera movement, which is more like the latter approach. I can't tell if they did it that way just to provide a simple effect demo or if there is a substantial benefit to that approach.
You can transform the environment without altering its data using the world transform, which can rotate, scale, displace, etc. But that matrix will be entangled with the transforms you use for the different elements of your scene graph.
A lot of the samples in the DirectX SDK use an effect that does a world transform to implement camera movement, which is more like the latter approach. I can't tell if they did it that way just to provide a simple effect demo or if there is a substantial benefit to that approach.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement