@Override
	public void onUpdate(Level level) {
		direction=vectorAsAngle(velocity)+currentOffset;
		double turnRate = level.getWorldDeltaTime()*360;
		if(Math.abs(targetOffset-currentOffset)<turnRate){
			currentOffset=targetOffset;
		}else{
			if(targetOffset>currentOffset){
				currentOffset+=turnRate;
			}else{
				if(targetOffset<currentOffset){
					currentOffset-=turnRate;
				}
			}
		}
		if(burning){
			thrust+=level.getWorldDeltaTime()*5;
			if(thrust>1){
				thrust=1;
			}
			velocity.x+=Entity.angleAsVector(direction).x*level.getWorldDeltaTime()*thrust;
			velocity.y+=Entity.angleAsVector(direction).y*level.getWorldDeltaTime()*thrust;
		}
		for(int i=0;i<level.entities.size();i++){
			Entity p = level.entities.get(i);
			if(p.entityType==Entity.PLANET && location.distance(p.location)<p.width/2){
				level.entities.remove(this);
			}
		}
	}