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;
};
+1 -1
View File
@@ -29,7 +29,7 @@ void VertexData::updateMesh(const Component::Transform& transform, PMesh mesh)
matInstanceData.meshes.add(MeshInstanceData{
.id = mesh->id,
.instance = InstanceData {
.transformMatrix = Matrix4(1),//transform.toMatrix(),
.transformMatrix = transform.toMatrix(),
},
.indexBuffer = mesh->indexBuffer,
});
-1
View File
@@ -16,7 +16,6 @@ Semaphore::Semaphore(PGraphics graphics)
Semaphore::~Semaphore()
{
graphics = nullptr;
vkDestroySemaphore(graphics->getDevice(), handle, nullptr);
}