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;
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
@@ -16,7 +16,6 @@ Semaphore::Semaphore(PGraphics graphics)
|
||||
|
||||
Semaphore::~Semaphore()
|
||||
{
|
||||
graphics = nullptr;
|
||||
vkDestroySemaphore(graphics->getDevice(), handle, nullptr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user