Take the 2-minute tour ×

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(
    } catch(Exception e) {

    Camera camera = new Camera(0,0,0);
    float dx;
    float dy;
    float dt;
    float sensitivity = 0.07f;
    float speed = 0.07f;
    // Generate the frames
    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)) {
        if(input.isKeyDown(input.SNEAK)) {
        if(input.isKeyDown(input.FORWARD)) {
        if(input.isKeyDown(input.BACK)) {
        if(input.isKeyDown(input.LEFT)) {
        if(input.isKeyDown(input.RIGHT)) {
        init3DGL(width, height);
        init2DGL(width, height);
        try {
            HotBar health =
                new HotBar(50, Tile.loadTexture("default_dirt.png"));
        } catch (Exception e) {

So I guess my question is: How do you keep a camera at a certain size?

share|improve this question
Can you think of a better title? It doesn't seem to sync with your question very well. And you can leave the tags out of the title. –  Byte56 May 16 '12 at 16:41
well, I don't exactly know what causes the problem, but I think this title is better –  MiJyn May 16 '12 at 16:56
Well, the title is funnier, but doesn't describe your problem any better. There's no magic in computers, they only do what you tell them. –  Byte56 May 16 '12 at 17:32
add comment

1 Answer

up vote 3 down vote accepted

You don't show how you adjust the scale, so this is speculation.

If you scale an object relative to the camera (or its initial position) as center point, there will be no visual change but speed of motion will necessarily be slower relative to the scale of the object, so your results are to be expected.

To strengthen the impression of size, add other things which provide a scale to compare to, such as:

  • Other objects of known size.
  • Camera's height above the ground/horizon; it should be at a realistic eye level for your character/vehicle. To establish a ground plane, create a textured plane and possibly also a horizon gradient.
  • Distance fog or blur partly obscuring the object will convey largeness.
  • Texture features on surfaces; objects viewed at a distance should have finer/softer grain whereas close-up ones show detail. If you want to present an object at two different sizes and have it look different, don't just scale the texture coordinates up.
share|improve this answer
ok, I guess I'm talking about the camera's height. How would I do this? –  MiJyn May 16 '12 at 19:37
You have to establish visual cues for the ground surface; the simplest way would be to render a textured ground plane. I recommend that you not focus on any one technique, but try to use as many different sorts of scale-dependent detail cues as you can in your scene. I've edited my answer with some more detail for the various techniques. –  Kevin Reid May 16 '12 at 20:37
Thanks, it works! –  MiJyn May 16 '12 at 20:59
add comment

Your Answer


