rustgd / cgmath

A linear algebra and mathematics library for computer graphics.
https://docs.rs/cgmath
Apache License 2.0
1.13k stars 155 forks source link

FPS Camera #266

Closed ghost closed 8 years ago

ghost commented 8 years ago

How to implement an FPS camera?

kvark commented 8 years ago

It's a method of the Transform trait. Do you have it in scope? You could do: let view: cgmath::Matrix4<_> = cgmath::Transform::look_at(...);

brendanzab commented 8 years ago

What, why does this have an empty title and description? What mysteries happened here?

kvark commented 8 years ago

Huh, weird. I also received another comment (prior to closing) that has probably got deleted here

brendanzab commented 8 years ago

@jellytux: if your problem was solved, would you mind posting the solution for the benefit of others? Would be most appreciated! :)

ghost commented 8 years ago

Solution: [1] Watch this: https://www.youtube.com/watch?v=-tonZsbHty8 [2] Read this: http://www.3dgep.com/understanding-the-view-matrix/ [3 optional] Read this: http://www.3dgep.com/understanding-quaternions/ [4 optional] For a mathematical understanding of the projection matrix read this: http://www.songho.ca/opengl/gl_projectionmatrix.html