]> git.tdb.fi Git - libs/game.git/commitdiff
Initialize Transform's matrices to identity
authorMikko Rasa <tdb@tdb.fi>
Fri, 25 Nov 2022 19:41:48 +0000 (21:41 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 25 Nov 2022 19:41:48 +0000 (21:41 +0200)
source/game/transform.h

index 05c895b42e949b42e2e2c328a6dd72b3fca90e5d..b1766aeb993292d576acb3abf23e7be9ec68fcee 100644 (file)
@@ -26,8 +26,8 @@ class Transform: public Component
 {
 private:
        TransformValues values;
-       LinAl::Matrix<float, 4, 4> local_matrix;
-       LinAl::Matrix<float, 4, 4> world_matrix;
+       LinAl::Matrix<float, 4, 4> local_matrix = LinAl::Matrix<float, 4, 4>::identity();
+       LinAl::Matrix<float, 4, 4> world_matrix = LinAl::Matrix<float, 4, 4>::identity();
 
 public:
        Transform(Handle<Entity>);