Played with values
This commit is contained in:
@@ -35,7 +35,7 @@ impl Projectile {
|
|||||||
impl Projectile {
|
impl Projectile {
|
||||||
fn tick(&mut self, env: &Environment) {
|
fn tick(&mut self, env: &Environment) {
|
||||||
self.position = self.position + self.velocity;
|
self.position = self.position + self.velocity;
|
||||||
self.velocity = env.wind + env.gravity;
|
self.velocity = self.velocity + env.wind + env.gravity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ fn main() {
|
|||||||
|
|
||||||
let mut ball = Projectile::new(
|
let mut ball = Projectile::new(
|
||||||
Tuple::point(0.0, 0.0, 1.0),
|
Tuple::point(0.0, 0.0, 1.0),
|
||||||
Tuple::vector(1.0, 0.0, 0.0),
|
Tuple::vector(10.0, 0.0, 100.0),
|
||||||
);
|
);
|
||||||
|
|
||||||
let mut tick = 0;
|
let mut tick = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user