add collisions to asteroids, reduce count from 8k to 512

This commit is contained in:
yuni 2024-03-30 22:59:18 +01:00
parent 0dca723eaf
commit 0f375fab64

View file

@ -82,7 +82,7 @@ pub fn setup(
// });
// Generate a bunch of asteriods
let maxdist = 10;
let maxdist = 4;
for i in -maxdist..maxdist {
for j in -maxdist..maxdist {
for k in -maxdist..maxdist {
@ -95,11 +95,11 @@ pub fn setup(
_ => ASSET_ASTEROID2,
};
commands.spawn((
actor::Actor {
v: Vec3::new(-0.00, 0.0, 0.35),
angular_momentum: Quat::from_euler(EulerRot::XYZ, 0.001, 0.001, 0.0003),
..default()
},
actor::Actor::default(),
RigidBody::Dynamic,
AngularVelocity(Vec3::new(0.001, 0.001, 0.0003)),
LinearVelocity(Vec3::new(0.0, 0.0, 0.35)),
Collider::sphere(1.0),
SceneBundle {
transform: Transform {
translation: Vec3::new(