Skip to content

Instantly share code, notes, and snippets.

@XMPPwocky
Created November 20, 2014 19:29
Show Gist options
  • Save XMPPwocky/896c4e3a33894977cbf2 to your computer and use it in GitHub Desktop.
Save XMPPwocky/896c4e3a33894977cbf2 to your computer and use it in GitHub Desktop.
let mut world = World::new();
let b1 = Shared::new(Body::Static {
shape: box ncollide::shape::Ball::new(0.5),
transform: na::Iso3::new(na::zero(), na::zero())
});
world.add(b1.clone());
let b2 = Shared::new(Body::Static {
shape: box ncollide::shape::Ball::new(0.5),
transform: na::Iso3::new(na::Vec3::new(0.0, 10.0, 0.0), na::zero())
});
world.add(b2.clone());
let cast = world.cast_body_nearest(b1, na::Vec3::new(0.0, 10.0, 0.0));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment