Why isnt this working....

This commit is contained in:
Dynamitos
2023-11-13 13:23:16 +01:00
parent a545426b32
commit 9a26fd75ca
6 changed files with 8 additions and 10 deletions
+1 -2
View File
@@ -54,8 +54,7 @@ void Camera::buildViewMatrix()
{
Vector eyePos = getTransform().getPosition();//getAbsoluteTransform().getPosition();
Vector lookAt = eyePos + glm::normalize(Vector(cos(yaw) * cos(pitch), sin(pitch), sin(yaw) * cos(pitch)));
//std::cout << "Eye: " << eyePos << " lookAt: " << lookAt << std::endl;
viewMatrix = glm::lookAt(Vector(100, 0, 10), Vector(0, 0, 0), Vector(0, 1, 0));//glm::lookAt(eyePos, lookAt, Vector(0, 1, 0));
viewMatrix = glm::lookAt(eyePos, lookAt, Vector(0, 1, 0));
bNeedsViewBuild = false;
}
+1 -1
View File
@@ -32,7 +32,7 @@ struct Camera
//Transforms relative to actor
float yaw;
float pitch;
bool mainCamera = true;
bool mainCamera = false;
private:
bool bNeedsViewBuild;
};