fix(Spatial/Transforms): fix transform propagation by making bevy entities for all spatials
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
@@ -242,6 +242,7 @@ fn build_line_mesh(
|
||||
extension: LineExtension { unused: 0 },
|
||||
})),
|
||||
));
|
||||
lines.spatial.set_entity(e.id());
|
||||
_ = lines.entity.set(e.id().into());
|
||||
e
|
||||
}
|
||||
|
||||
@@ -243,6 +243,7 @@ fn gen_model_parts(
|
||||
});
|
||||
spatial.set_local_transform(transform.compute_matrix());
|
||||
|
||||
spatial.set_entity(entity);
|
||||
cmds.entity(entity)
|
||||
.insert(SpatialNode(Arc::downgrade(&spatial)));
|
||||
let mesh_entity = children_query
|
||||
@@ -570,7 +571,6 @@ impl Model {
|
||||
);
|
||||
}
|
||||
None => {
|
||||
// TODO: this could be a denail of service vector
|
||||
let client = self.spatial.node().unwrap().get_client().unwrap();
|
||||
let part_node = client.scenegraph.add_node(Node::generate(&client, false));
|
||||
let spatial = Spatial::add_to(
|
||||
|
||||
@@ -168,6 +168,7 @@ fn spawn_text(
|
||||
.add_children(&letters)
|
||||
.id();
|
||||
text.entity.lock().replace(EntityHandle(entity));
|
||||
text.spatial.set_entity(entity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user