add collisions to asteroids, reduce count from 8k to 512
This commit is contained in:
parent
0dca723eaf
commit
0f375fab64
12
src/world.rs
12
src/world.rs
|
@ -82,7 +82,7 @@ pub fn setup(
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// Generate a bunch of asteriods
|
// Generate a bunch of asteriods
|
||||||
let maxdist = 10;
|
let maxdist = 4;
|
||||||
for i in -maxdist..maxdist {
|
for i in -maxdist..maxdist {
|
||||||
for j in -maxdist..maxdist {
|
for j in -maxdist..maxdist {
|
||||||
for k in -maxdist..maxdist {
|
for k in -maxdist..maxdist {
|
||||||
|
@ -95,11 +95,11 @@ pub fn setup(
|
||||||
_ => ASSET_ASTEROID2,
|
_ => ASSET_ASTEROID2,
|
||||||
};
|
};
|
||||||
commands.spawn((
|
commands.spawn((
|
||||||
actor::Actor {
|
actor::Actor::default(),
|
||||||
v: Vec3::new(-0.00, 0.0, 0.35),
|
RigidBody::Dynamic,
|
||||||
angular_momentum: Quat::from_euler(EulerRot::XYZ, 0.001, 0.001, 0.0003),
|
AngularVelocity(Vec3::new(0.001, 0.001, 0.0003)),
|
||||||
..default()
|
LinearVelocity(Vec3::new(0.0, 0.0, 0.35)),
|
||||||
},
|
Collider::sphere(1.0),
|
||||||
SceneBundle {
|
SceneBundle {
|
||||||
transform: Transform {
|
transform: Transform {
|
||||||
translation: Vec3::new(
|
translation: Vec3::new(
|
||||||
|
|
Loading…
Reference in a new issue