Difference between revisions of "Thread:Talk:Main Page/Virtual bullet doesn't line up with real bullets/reply (10)"

From Robowiki
Jump to navigation Jump to search
 
Line 8: Line 8:
 
             fire(2);
 
             fire(2);
 
         }
 
         }
 
+
   
 
         turnGunRightRadians(enemyRelativeGunHeading);
 
         turnGunRightRadians(enemyRelativeGunHeading);
 
     }
 
     }
  
 
I know this would be wrong. I just don't know how to fix it =S
 
I know this would be wrong. I just don't know how to fix it =S

Latest revision as of 05:04, 5 October 2011

Wait i'm not sure if i understand what you mean by the next tick's position. How do I accomplish that?

Here's what I roughly have:

   while (true){
       if (getGunHeat() == 0.0){
           fireVirtualBullet(enemyCurrentAbsoluteBearing); // Just use Head on targeting as an example because it's simple
           fire(2);
       }
   
       turnGunRightRadians(enemyRelativeGunHeading);
   }

I know this would be wrong. I just don't know how to fix it =S