Advertisement
C0BRA

MC Bow

Mar 11th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. double force = 1.0;
  2.  
  3. if(force > 1.0)
  4.         force = 1.0;
  5.  
  6. force *= 2.0 * 1.5;
  7. CVector pos(0, 0, 0);
  8. CVector dir(10, 0);
  9.  
  10. CVector motion = dir.Normal() * force;
  11.  
  12. const double step = 0.1;
  13.  
  14. for(double t = 0; t < 1.5; t += step)
  15. {
  16.     pos += motion;
  17.     motion = motion * pow(0.99, step * 20.0);
  18.     motion.Z += * -pow(0.05, step * 20.0) // Y in minecraft!
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement