Movement copied from the minecraft wiki :3

This commit is contained in:
2026-09-28 12:01:51 -03:00
parent ded9a7e5d0
commit 036f8075f5
5 changed files with 189 additions and 12 deletions
+4 -1
View File
@@ -10,7 +10,9 @@ export class Camera {
yaw = 0;
roll = 0;
fov = Math.PI / 3;
// vertical, minecraft's default 70 degrees. fov is that, widened by the entity it's on
base_fov = 70 * Math.PI / 180;
fov = this.base_fov;
near = 0.1;
far = 1000;
@@ -21,5 +23,6 @@ export class Camera {
this.z = z;
this.yaw = entity.yaw;
this.pitch = entity.pitch;
this.fov = this.base_fov * entity.render_fov_scale(partial_tick);
}
}