From 87e0529afb19d3885dbc516f188783dddfdb79d8 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Fri, 14 Mar 2025 08:41:12 +0100 Subject: [PATCH] fix spawn position --- src/tb_entities.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tb_entities.rs b/src/tb_entities.rs index ae84b3f..07a1938 100644 --- a/src/tb_entities.rs +++ b/src/tb_entities.rs @@ -20,9 +20,19 @@ impl SpawnPoint { return; }; + let this_transform = world + .get_entity(entity) + .unwrap() + .get::() + .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")); world.commands().entity(entity).insert(( + this_transform, Name::new("spawn"), SceneRoot(mesh), RigidBody::Static,