Okay, so I have this summer course and we have to do a project in processing. I've just studied 2 years of C++ in my school, so I'm a bit new to all this 3D stuff. Our teacher suggested that me and my partner should try on a bit of a challenge for our project, and so told us to experiment with OpenGL in Processing. So we're actually planning to make a simple 3D maze with a first person camera. However, it doesn't seem to be going as planned. We figured out how to use pushmatrix and popmatrix, and made the person start off inside the cube, but we're not really sure where to go from here. Can someone help us out? I keep trying to make the person move with the camera, but it doesn't seem to work how I want it to. This is what we've done so far, and we've got a week left. Is this feasible?
int i=0;
int i2=0;
float b = 10;
void setup()
{
size(1900, 1000, OPENGL);
strokeCap(SQUARE);
background(255);
pushMatrix();
fill(225, 0, 0);
translate(width/2, height/2, 800);
box(200, 150, 400);
popMatrix();
pushMatrix();
translate((width/2)-20, height/2, 750);
box(100, 100, 10);
popMatrix();
}
void draw() {
background(255);
resetEn();
moveFW();
}
void moveFW()
{
if (keyPressed)
{
if (key=='w')
{
i2++;
}
}
}
void resetEn() {
background(255);
pushMatrix();
fill(225, 0, 0);
translate(width/2, height/2, 800+i2);
rotateY(mouseX*0.01);
box(200, 150, 400);
popMatrix();
pushMatrix();
translate((width/2)-20, height/2, 750+i2);
rotateY(mouseX*0.01);
box(100, 100, 10);
popMatrix();
}