Skip to content

Commit

Permalink
fix(physics): add missing initialization of variables in components
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenatlas committed Jan 22, 2025
1 parent 819f9e0 commit 40946bb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace cubos::engine
}

private:
glm::vec3 mAngularImpulse;
glm::vec3 mAngularImpulse = {0.0F, 0.0F, 0.0F};
};

} // namespace cubos::engine
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ namespace cubos::engine
{
CUBOS_REFLECT;

glm::vec3 vec;
glm::vec3 vec = {0.0F, 0.0F, 0.0F};
};
} // namespace cubos::engine
4 changes: 2 additions & 2 deletions engine/include/cubos/engine/physics/components/impulse.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ namespace cubos::engine
}

private:
glm::vec3 mImpulse;
glm::vec3 mAngularImpulse;
glm::vec3 mImpulse = {0.0F, 0.0F, 0.0F};
glm::vec3 mAngularImpulse = {0.0F, 0.0F, 0.0F};
};

} // namespace cubos::engine
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ namespace cubos::engine
{
CUBOS_REFLECT;

glm::vec3 vec;
glm::vec3 vec = {0.0F, 0.0F, 0.0F};
};
} // namespace cubos::engine

0 comments on commit 40946bb

Please sign in to comment.