I'm making a first-person game, and I've gotten the camera done (modified version of Lloyd Goodall's code), but whenever I scale an object, it doesn't appear bigger, but the speed of movement seems to have slowed down (of course, I know that this is because of the size, but I'd rather want to see the objects scaled up). Here is my code:
Prism rect = new Prism(new Vector3f(1f, 1f, 1f), new Vector3f(1,1,1));
try {
rect.setTextures(new TextureArray(
tl.loadTexture("default_dirt.png")).getTextures());
} catch(Exception e) {
e.printStackTrace();
Errors.exit(Errors.EXCEPTION);;
}
Camera camera = new Camera(0,0,0);
float dx;
float dy;
float dt;
float sensitivity = 0.07f;
float speed = 0.07f;
// Generate the frames
Mouse.setGrabbed(true);
while (!Display.isCloseRequested() && !input.isKeyDown(input.ESC)) {
dt = getDelta()/10;
dx = Mouse.getDX();
dy = Mouse.getDY();
camera.incYaw(dx * sensitivity);
camera.decPitch(dy * sensitivity);
float dist = speed*dt;
if(input.isKeyDown(input.JUMP)) {
camera.up(dist);
}
if(input.isKeyDown(input.SNEAK)) {
camera.down(dist);
}
if(input.isKeyDown(input.FORWARD)) {
camera.forward(dist);
}
if(input.isKeyDown(input.BACK)) {
camera.back(dist);
}
if(input.isKeyDown(input.LEFT)) {
camera.left(dist);
}
if(input.isKeyDown(input.RIGHT)) {
camera.right(dist);
}
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
GL11.glLoadIdentity();
init3DGL(width, height);
camera.look();
rect.render();
init2DGL(width, height);
try {
HotBar health =
new HotBar(50, Tile.loadTexture("default_dirt.png"));
health.render();
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
Display.update();
Display.sync(30);
}
Display.destroy();
So I guess my question is: How do you keep a camera at a certain size?