# Search:

Type: Posts; User: GClements

1. ## Thread: trig model FPS angle generation

by GClements
Replies
10
Views
855

### A matrix represents a linear function....

A matrix represents a linear function. Multiplying matrices is equivalent to composing the functions.

Matrix multiplication is associative: (A.B).v = A.(B.v) (vectors are just matrices with a...
2. ## Thread: trig model FPS angle generation

by GClements
Replies
10
Views
855

### This should be the other way around: ...

This should be the other way around:

_vector = _trans * _vector;

Reversing the order has the same effect as transposing the matrix:

(A.B)T=BT.AT

GLM has the same behaviour as GLSL:...
3. ## Thread: trig model FPS angle generation

by GClements
Replies
10
Views
855

### glm::mat4 my = glm::rotate(yrot, 0.0f, 1.0f,...

glm::mat4 my = glm::rotate(yrot, 0.0f, 1.0f, 0.0f);
glm::mat4 mx = glm::rotate(xrot, 1.0f, 0.0f, 0.0f);
glm::mat4 m = my * mx;

or:

glm::mat4 m = glm::mat4(1.0);
glm::rotate(m, yrot, 0.0f,...
4. ## Thread: trig model FPS angle generation

by GClements
Replies
10
Views
855

### In terms of your code, it's the direction you...

In terms of your code, it's the direction you move when you press W. In the more general sense, Euler angles are just a way of representing a rotation (i.e. an orthonormal matrix). What that matrix...

by GClements
Replies
10
Views
855