Why isnt this working....
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ struct Camera
|
||||
//Transforms relative to actor
|
||||
float yaw;
|
||||
float pitch;
|
||||
bool mainCamera = true;
|
||||
bool mainCamera = false;
|
||||
private:
|
||||
bool bNeedsViewBuild;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user