Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double force = 1.0;
- if(force > 1.0)
- force = 1.0;
- force *= 2.0 * 1.5;
- CVector pos(0, 0, 0);
- CVector dir(10, 0);
- CVector motion = dir.Normal() * force;
- const double step = 0.1;
- for(double t = 0; t < 1.5; t += step)
- {
- pos += motion;
- motion = motion * pow(0.99, step * 20.0);
- motion.Z += * -pow(0.05, step * 20.0) // Y in minecraft!
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement