whats better or easier?

Started by
2 comments, last by dalep 18 years, 6 months ago
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.
Advertisement
Hi,

Do whichever is simpler to implement and results in less number of operations.
The more applications I write, more I find out how less I know
Moving the camera is going to be alot less expensive than moving your entire world.
:stylin: "Make games, not war.""...if you're doing this to learn then just study a modern C++ compiler's implementation." -snk_kid
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.

This topic is closed to new replies.

Advertisement