habitacle
This commit is contained in:
+18
-10
@@ -38,16 +38,24 @@ fn setup(
|
||||
Transform::default(),
|
||||
));
|
||||
// ajout véhicule
|
||||
commands.spawn((
|
||||
Vehicle {
|
||||
speed: 5.0,
|
||||
velocity: Vec3::ZERO,
|
||||
angle: 0.0,
|
||||
},
|
||||
Mesh3d(meshes.add(Cuboid::new(1.0, 0.5, 2.0))),
|
||||
MeshMaterial3d(materials.add(Color::srgb(0.8, 0.2, 0.2))),
|
||||
Transform::from_xyz(0.0, 0.25, 0.0),
|
||||
));
|
||||
commands
|
||||
.spawn((
|
||||
Vehicle {
|
||||
speed: 5.0,
|
||||
velocity: Vec3::ZERO,
|
||||
angle: 0.0,
|
||||
},
|
||||
Mesh3d(meshes.add(Cuboid::new(1.0, 0.5, 2.0))),
|
||||
MeshMaterial3d(materials.add(Color::srgb(0.8, 0.2, 0.2))),
|
||||
Transform::from_xyz(0.0, 0.25, 0.0),
|
||||
))
|
||||
.with_children(|parent| {
|
||||
parent.spawn((
|
||||
Mesh3d(meshes.add(Cuboid::new(1.0, 0.4, 1.0))),
|
||||
MeshMaterial3d(materials.add(Color::srgb(0.2, 0.2, 0.8))),
|
||||
Transform::from_xyz(0.0, 0.45, 0.3),
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
fn move_vehicle(
|
||||
|
||||
Reference in New Issue
Block a user