fix LookAt

This commit is contained in:
Vadim Lopatin 2016-04-11 13:57:11 +03:00
parent 8ce099d554
commit 40b15f77c1
1 changed files with 2 additions and 0 deletions

View File

@ -103,6 +103,7 @@ class Transform : RefCountedObject {
_scale = vec3(1.0f, 1.0f, 1.0f);
_translation = vec3(0.0f, 0.0f, 0.0f);
_rotation = mat4.identity;
_matrix.setIdentity();
}
/// get transform matrix, recalculates if needed
@ -126,6 +127,7 @@ class Transform : RefCountedObject {
}
void lookAt(const vec3 eye, const vec3 center, const vec3 up) {
_matrix.setIdentity();
_matrix.lookAt(eye, center, up);
_dirtyTransform = false;
}