From 6a5de7ba2f095eb9894ae8f3cc739cb90f1c38c4 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Sat, 12 Apr 2025 09:46:19 +0200 Subject: [PATCH] make spawn more accurate --- assets/maps/map1.map | 2 +- assets/models/spawn.glb | Bin 2804 -> 2824 bytes src/tb_entities.rs | 12 +----------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/assets/maps/map1.map b/assets/maps/map1.map index ae39e1d..a5bbd7e 100644 --- a/assets/maps/map1.map +++ b/assets/maps/map1.map @@ -783,7 +783,7 @@ // entity 1 { "classname" "spawn_point" -"origin" "104 216 -248" +"origin" "168 216 -248" } // entity 2 { diff --git a/assets/models/spawn.glb b/assets/models/spawn.glb index 156bb782fce204f5d6bcf9b2bd5ee251e697a831..f25ca8968c271c69be36353b5789d85fcedeb102 100644 GIT binary patch delta 127 zcmew&+9Af9o)hB6#K6G7!Og&6Fp>9Aw3(iTk&&gDg^7icrMaP@rJ;_Yo{5REv8929 ziJ6h9k%@_+i4KOMSRJL3qQt!7oWzpM{5&PAXagMsJ#%Ao3ln1#Q)3GY6GI~ti_MaZ Q;_S={3JRMIIF2v@05m@xGXMYp delta 106 zcmeAW`y$Glo)hB6#K6Gtg^PhfW+Lw)FH=1OBNJmYOLIdrGZPad3v(Sq9SpHp9i@_@ v#Ju91#FEVXJSD4W104fBQzJ7AV?zUD0}B&VGZQ1j&037&?3-OUjxYfLa8nv5 diff --git a/src/tb_entities.rs b/src/tb_entities.rs index 673551a..1354748 100644 --- a/src/tb_entities.rs +++ b/src/tb_entities.rs @@ -22,23 +22,13 @@ 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 = assets.mesh_spawn.clone(); world.commands().entity(entity).insert(( - this_transform, Name::new("spawn"), SceneRoot(mesh), RigidBody::Static, - ColliderConstructorHierarchy::new(ColliderConstructor::TrimeshFromMesh), + ColliderConstructorHierarchy::new(ColliderConstructor::ConvexHullFromMesh), )); } }