bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
35.58k stars 3.52k forks source link

Split UI/2D Transforms from 3D #7876

Open james7132 opened 1 year ago

james7132 commented 1 year ago

What problem does this solve or what need does it fill?

A full 3D affine transform is a poor fit for UIs and often overkill for 2D uses. Transform and it's propagation system is a major bottleneck in PostUpdate, with a large number of potentially separable systems dependent on them.

What solution would you like?

Split out Transform2D and RectTransform from Transform, explicitly for their respective use cases.

Pros

Cons

What alternative(s) have you considered?

Leave it as is for now.

mockersf commented 1 year ago

related to #1275

tim-blackbird commented 1 year ago

UI probably doesn't need a dedicated propagation or GlobalTransform equivalent, relying on the UI layouting algorithm instead.

World space UI(#5476) is something to keep in mind.