Implemented keyboard input

This commit is contained in:
Lorenzo Torres 2025-08-10 20:01:31 +02:00
parent 4eed1778a6
commit b6d50a781d
11 changed files with 179 additions and 59 deletions

View file

@ -47,8 +47,7 @@ pub const Matrix = extern struct {
pub fn lookAt(eye: [3]f32, target: [3]f32, arbitrary_up: [3]f32) Matrix {
const t: @Vector(3, f32) = target;
var e: @Vector(3, f32) = eye;
e = -e;
const e: @Vector(3, f32) = eye;
const u: @Vector(3, f32) = arbitrary_up;
const forward = normalize(t - e);
const right = normalize(cross(forward, u));