@Override
    public void update(float tpf) {
        float speed = fast ? walkSpeed * 2 : walkSpeed;

        Vector3f camDir = cam.getDirection().clone().multLocal(speed);
        Vector3f camLeft = cam.getLeft().clone().multLocal(speed);
        camDir.y = 0;
        camLeft.y = 0;
        walkDirection.set(0, 0, 0);

        if (left) {
            walkDirection.addLocal(camLeft);
        }
        if (right) {
            walkDirection.addLocal(camLeft.negate());
        }
        if (up) {
            walkDirection.addLocal(camDir);
        }
        if (down) {
            walkDirection.addLocal(camDir.negate());
        }

        if (jumping && oto.getPlayerControl().isOnGround()) {
            oto.getPlayerControl().jump();
        }

        // this is for making the character walk
        character.setWalkDirection(walkDirection);
        oto.setGunLocation();

        if (character.getPhysicsLocation().y < -1000f) {
            respawnSelf();
        }
    }