orient airships correctly on load

This commit is contained in:
Isse
2023-04-14 11:15:50 +02:00
parent 2208a3037e
commit 3548b464da
9 changed files with 45 additions and 45 deletions

View File

@ -64,6 +64,7 @@ pub trait StateExt {
fn create_ship<F: FnOnce(comp::ship::Body) -> comp::Collider>(
&mut self,
pos: comp::Pos,
ori: comp::Ori,
ship: comp::ship::Body,
make_collider: F,
) -> EcsEntityBuilder;
@ -338,6 +339,7 @@ impl StateExt for State {
fn create_ship<F: FnOnce(comp::ship::Body) -> comp::Collider>(
&mut self,
pos: comp::Pos,
ori: comp::Ori,
ship: comp::ship::Body,
make_collider: F,
) -> EcsEntityBuilder {
@ -347,7 +349,7 @@ impl StateExt for State {
.create_entity_synced()
.with(pos)
.with(comp::Vel(Vec3::zero()))
.with(comp::Ori::default())
.with(ori)
.with(body.mass())
.with(body.density())
.with(make_collider(ship))