Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> 16 void Camera2D::update ()
- 17 {
- 18 if (_change)
- 19 {
- 20 glm::vec3 translate (-_position.x + _screenWidth / 2, -_position.y + _screenHeight / 2, 0.0f);
- 21 _cameraMatrix = glm::translate (_orthoMatrix, translate);
- 22
- 23 glm::vec3 scale (_scale, _scale, 0.0f);
- 24 _cameraMatrix = glm::scale (glm::mat4 (1.0f), scale) * _cameraMatrix;
- 25
- 26 _change = false;
- 27 }
- 28 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement