Yeah, if i'm correct, you might be using Direct3D as you graphics API which wants the view matrix to be row-major (if i'm correct).
I am using OpenGL which expects the matrix to be column-major,...
Type: Posts; User: mav
Yeah, if i'm correct, you might be using Direct3D as you graphics API which wants the view matrix to be row-major (if i'm correct).
I am using OpenGL which expects the matrix to be column-major,...
Got it fixed the right way i suppose.
I switched the order of the cross product vectors and it did as i expected, that is, it gives the opposite perpendicular vector, which is what i wanted to get...
voidInitializeCam(void) {
speed = 0.05f;
viewMatrix = glm::mat4(1.0f);
right = glm::vec3(1,0,0);
up = glm::vec3(0,1,0);
front = glm::vec3(0,0,-1);
position...
Nevermind the position detail, i forgot i was saving the base position of the camera before transforming it into the camera matrix. :)
I created a simple camera from your example and it seems to work very well. I do have a few problems though.
The camera code i implemented from your example:
typedef struct cam_s {
GLfloat...
From what i read, Euler angles are easy to understand but are heavy on maths, where quaternions are lighter on maths (although more complicated) and don't suffer from gimbal locks.
Not sure...
Hi,
I am trying to implement a camera using both quaternions and axis angles.
I'm new to the maths in this area (started 2 weeks ago), so, no experience :frown:
Since i found this thread on...