lid6j86's picture

Camera creation

Ive been scouring places for information on transformations in order to make a decent moving camera to explore the vast empty void. So far ive found a few different methods:

One with quadernerions
One that simply calls rotate three time ( one for each axis) then translates the coords
One that uss the lookat function

My question is which method would make the most sense? Ive tried 1 and 3, and have seen many people reccomend against 1.

Also in regards to lookat(), the parameters are simple enough but i have a question about its application.

The eye coordinates are very easy because that can be thought of as the physical location of the camera. If im trying to make a freeform camera that can look around in 3d space, how do i get the point it should be looking at? Im guessing i will have to figure out some circle math? If thats the case how do i get it to translate into a point to look at?

And finally for the up vector, i should be able to just take the perpendicular vector of the arbitrary point im looking at, correct?

Thanks for the help


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
flopoloco's picture

Have a look at MonoGame camera implementation. It's not based on OpenTK Vector classes but it seems great otherwise.