I am trying to make a 3D game using p5.js. I have used the 3d version before, and every time I run into this issue. If the camera gets too close to any objects I am rendering, it will get cut off by a little. This is my camera code:
camera(x, y, z, dirx, diry, dirz, 0, -1, 0);
I have a feeling that the last 3 arguments are wrong, but I am not sure.
Just so you know, the first 6 arguments are working just fine. (meaning I can look around)
NOTE: I am using noFill();
to get the outline of the cube, but the same thing happens when I don't use noFill();
Cube getting cut off:
What it should look like: