make spawn more accurate
This commit is contained in:
@@ -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.
@@ -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),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user