fix spawn position
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user