public Vector3f checkCollision(Vector3f oldPos, Vector3f newPos, float objectWidth,
                                   float objectLength){
        Vector2f collisionVector = new Vector2f(1, 1);
        Vector3f movementVector = newPos.sub(oldPos);

        if(movementVector.length() > 0){
            Vector2f blockSize = new Vector2f(SPOT_WIDTH, SPOT_LENGTH);
            Vector2f objectSize = new Vector2f(objectWidth, objectLength);

            Vector2f oldPos2 = new Vector2f(oldPos.getX(), oldPos.getZ());
            Vector2f newPos2 = new Vector2f(newPos.getX(), newPos.getZ());

            for(int i = 0; i < level.getWidth(); i++) {
                for (int j = 0; j < level.getHeight(); j++) {
                    if ((level.getPixel(i, j) & 0xFFFFFF) == 0) {
                        collisionVector = collisionVector.mul(rectCollide(oldPos2, newPos2, objectSize,
                                blockSize.mul(new Vector2f(i, j)), blockSize));
                    }
                }
            }

            for(Door d : doors){
                //TODO: Make this take into account door's orientation
                Vector2f doorSize = d.getDoorSize();
                Vector3f doorPos3f = d.getTransform().getTranslation();
                Vector2f doorPos2f = new Vector2f(doorPos3f.getX(), doorPos3f.getZ());
                collisionVector = collisionVector.mul(rectCollide(oldPos2, newPos2, objectSize,
                        doorPos2f, doorSize));
            }
        }

        return new Vector3f(collisionVector.getX(), 0, collisionVector.getY());
    }