Bevy Mod Transform2d
A 2D Transform component for Bevy.
Usage
[]
= "0.2"
use *;
Take a look here for the examples.
Version table.
Bevy | transform2d |
---|---|
main | bevy_main |
0.8 | 0.2 |
0.7 | 0.1 |
Note that the Transform2d
component does not replace Transform
component, instead it writes to it. The Transform
and GlobalTransform
components are required for Transform2d
to function.
To integrate with another library that modifies Transform
the state of Transform
and Transform2d
will need to be synchronised at the right times.
This is implemented for bevy_rapier2d
with a feature of the same name.
[]
= { = "0.2", = ["bevy_rapier2d"] }
If there is another library interacts with the transform here's how you would synchronise the state to keep it up-to-date.
- When a system needs to read from
Transfrom
add the providedsync_to_3d_transform
system before it. - When a system writes to
Transfrom
add the providedsync_from_3d_transform
system after it.