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

@@ -22,23 +22,13 @@ impl SpawnPoint {
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();
world.commands().entity(entity).insert((
this_transform,
Name::new("spawn"),
SceneRoot(mesh),
RigidBody::Static,
ColliderConstructorHierarchy::new(ColliderConstructor::TrimeshFromMesh),
ColliderConstructorHierarchy::new(ColliderConstructor::ConvexHullFromMesh),
));
}
}