We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be78c9a commit eed16d5Copy full SHA for eed16d5
source/Camera.h
@@ -36,11 +36,13 @@ namespace dae
36
Matrix CalculateCameraToWorld()
37
{
38
Matrix out;
39
- const Vector3 _right{forward.z, 0.f, -forward.x};
40
- const Vector3 _up = Vector3::Cross(forward, _right);
41
- out[0] = Vector4{_right.Normalized(), 0.f};
42
- out[1] = Vector4{_up.Normalized(), 0.f};
43
- out[2] = Vector4{forward.Normalized(), 0.f};
+ //forward.Normalize();
+ //std::cout << "forward: " << forward.Magnitude() << std::endl;
+ right = Vector3{forward.z, 0.f, -forward.x};
+ up = Vector3::Cross(forward, right);
+ out[0] = Vector4{right, 0.f};
44
+ out[1] = Vector4{up, 0.f};
45
+ out[2] = Vector4{forward, 0.f};
46
out[3] = Vector4{origin, 1.f};
47
return out;
48
}
0 commit comments