public void foward(float delta, Level level, int currentRoom) {
		Float x,y,z,minX,maxX,minY,maxY;		

		minY = level.getRoomList().get(currentRoom).getPos().getY();
		maxY = level.getRoomList().get(currentRoom).getPos().getY() + level.getRoomList().get(currentRoom).getDy();
		minX = level.getRoomList().get(currentRoom).getPos().getX();
		maxX = level.getRoomList().get(currentRoom).getPos().getX() + level.getRoomList().get(currentRoom).getDx();

		walking = true;
		//Checking if the entity is inside the room boundery.
		if(getPos().getX() + ((getSpeed() * Math.cos(getOrientation())) * delta) >= minX && getPos().getX() + ((getSpeed() * Math.cos(getOrientation())) * delta) <= maxX){
			x = (float) ((getSpeed() * Math.cos(getOrientation()) * delta) + getPos().getX());
		}else{
			//Moving the payer 0.01f from the wall
			if(getSpeed() * Math.cos(getOrientation()) * delta > 0){
				x = level.getRoomList().get(currentRoom).getPos().getX() + level.getRoomList().get(currentRoom).getDx() - 0.01f;
			}else{
				x = level.getRoomList().get(currentRoom).getPos().getX() + 0.01f;
			}
		}

		//Checking if the entity is inside the room boundery.
		if(getPos().getY() + ((getSpeed() * Math.sin(getOrientation())) * delta) >= minY && getPos().getY() + ((getSpeed() * Math.sin(getOrientation())) * delta) <= maxY){
			y = (float) ((getSpeed() * Math.sin(getOrientation()) * delta) + getPos().getY());
		}else{
			//Moving the payer 0.01f from the wall
			if(getSpeed() * Math.sin(getOrientation()) * delta > 0){
				y = level.getRoomList().get(currentRoom).getPos().getY() + level.getRoomList().get(currentRoom).getDy() - 0.01f;
			}else{
				y = level.getRoomList().get(currentRoom).getPos().getY() + 0.01f;
			}
		}

		z = 0.0f + getPos().getZ();

		//Checking if the new X,Y,Z is equal to the old X,Y,Z. If so then object haven't be walking.
		if(getPos().equals(new Point(x,y,z)) == true){
			walking = false;
		}

		setPos(x, y, z);
	}