make spawn more accurate

This commit is contained in:
2025-04-12 09:46:19 +02:00
parent 9df3c00abb
commit 6a5de7ba2f
3 changed files with 2 additions and 12 deletions

View File

@@ -783,7 +783,7 @@
// entity 1 // entity 1
{ {
"classname" "spawn_point" "classname" "spawn_point"
"origin" "104 216 -248" "origin" "168 216 -248"
} }
// entity 2 // entity 2
{ {

Binary file not shown.

View File

@@ -22,23 +22,13 @@ 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 = assets.mesh_spawn.clone(); let mesh = assets.mesh_spawn.clone();
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,
ColliderConstructorHierarchy::new(ColliderConstructor::TrimeshFromMesh), ColliderConstructorHierarchy::new(ColliderConstructor::ConvexHullFromMesh),
)); ));
} }
} }