mirror of
https://github.com/bevyengine/bevy
synced 2024-11-23 13:13:49 +00:00
eaeba0866d
# Objective Fixes #4697. Hierarchical propagation of properties, currently only Transform -> GlobalTransform, can be a very expensive operation. Transform propagation is a strict dependency for anything positioned in world-space. In large worlds, this can take quite a bit of time, so limiting it to a single thread can result in poor CPU utilization as it bottlenecks the rest of the frame's systems. ## Solution - Move transforms without a parent or a child (free-floating (Global)Transform) entities into a separate parallel system. - Chunk the hierarchy based on the root entities and process it in parallel with `Query::par_for_each_mut`. - Utilize the hierarchy's specific properties introduced in #4717 to allow for safe use of `Query::get_unchecked` on multiple threads. Assuming each child is unique in the hierarchy, it is impossible to have an aliased `&mut GlobalTransform` so long as we verify that the parent for a child is the same one propagated from. --- ## Changelog Removed: `transform_propagate_system` is no longer `pub`. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
Bevy Transform
This crate is largely a 1:1 port from legion_transform (ecs: legion, math: nalgebra) to bevy (ecs: bevy_ecs, math: glam)