This commit is contained in:
MihailRis 2024-05-24 05:22:14 +03:00
parent 5ac51a6fa4
commit a1776e015e
2 changed files with 2 additions and 3 deletions

View File

@ -21,10 +21,9 @@ void Camera::updateVectors(){
}
void Camera::rotate(float x, float y, float z){
rotation = glm::rotate(rotation, z, glm::vec3(0,0,1));
rotation = glm::rotate(rotation, y, glm::vec3(0,1,0));
rotation = glm::rotate(rotation, x, glm::vec3(1,0,0));
rotation = glm::rotate(rotation, z, glm::vec3(0,0,1));
updateVectors();
}

View File

@ -58,8 +58,8 @@ public:
std::shared_ptr<T> tObj = std::make_shared<T>(args...);
std::shared_ptr<Object> obj = std::dynamic_pointer_cast<Object, T>(tObj);
obj->objectUID = objects.size();
objects.push_back(obj);
obj->objectUID = objects.size();
obj->spawned();
return tObj;
}