fix spawn position

This commit is contained in:
2025-03-14 08:41:12 +01:00
parent f8207f69b3
commit 87e0529afb

View File

@@ -20,9 +20,19 @@ impl SpawnPoint {
return; return;
}; };
let this_transform = world
.get_entity(entity)
.unwrap()
.get::<Transform>()
.unwrap();
let mut this_transform = *this_transform;
this_transform.translation += Vec3::new(0., -0.3, 0.);
let mesh = asset_server.load(GltfAssetLabel::Scene(0).from_asset("models/spawn.glb")); let mesh = asset_server.load(GltfAssetLabel::Scene(0).from_asset("models/spawn.glb"));
world.commands().entity(entity).insert(( world.commands().entity(entity).insert((
this_transform,
Name::new("spawn"), Name::new("spawn"),
SceneRoot(mesh), SceneRoot(mesh),
RigidBody::Static, RigidBody::Static,