public void calculateBobbing(){
		float maxB = 3.5f;
		float inc = 0.25f;
		
		if(moving){
			if(up){
				if(bob + inc < maxB) bob += inc;
				else bob = maxB;
				if(bob == maxB) up = false;
			}else{
				if(bob - inc > 0.0f) bob -= inc;
				else bob = 0.0f;
				if(bob == 0.0f) up = true; 
			}
		}else{
			bob = 0.0f;
		}
	}