New answers tagged

1

It's unclear where your issue lies. To rotate a vector about the origin, you create a rotation matrix, and then you multiply the vertex by the matrix. In order to create the rotation matrix, you need a rotation axis and an angle. With glm, you can do it this way: glm::vec3 v3RotAxis( 0.0f, 0.0f, 1.0f ); // Rotate about z+ float angleRad = ...


3

You get the error because there is no operator*= for vec4 that takes a matrix as a parameter. It then tries to convert the matrix to a float, but just can't. To work around this, you should try to not use the operator*= and write it all in the long form: Off = Off * Util::createTransform(offset); Also, as pointed out in the comments to the OP, what you ...



Top 50 recent answers are included