You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was pretty easy to do with the old bevy_easings crate, that this crate was based on, because it dealt with the entire Transform all at once.
Here, you are providing separate "lenses" for translation, rotation, and scale, and all of them set the generic parameter on Lens<T> to T: Transform, meaning that I cannot add multiple to the same entity simultaneously. There is no lens for working with the whole transform. :(
So have you made it impossible to tween between two Transforms? Only leaving the possibility to operate on one field at a time?
The text was updated successfully, but these errors were encountered:
because it dealt with the entire Transform all at once.
The animators always deal with the entire Component at once since that's what the world fetch via the system gets them.
you are providing separate "lenses" for translation, rotation, and scale
The crate is providing example lenses, yes :)
There is no lens for working with the whole transform.
Here:
#[derive(Debug,Copy,Clone,PartialEq)]pubstructTransformLens{/// Start value.pubstart:Transform,/// End value.pubend:Transform,}implLens<Transform>forTransformLens{fnlerp(&mutself,target:&mutTransform,ratio:f32){
target = ...;}}
So have you made it impossible to tween between two Transforms?
Out of the box, there's no provided lens for the whole Transform indeed, because I don't think that's such a common case that this is needed. As shown above it's trivial to make your own though, and is the encouraged way for more advanced usage.
This was pretty easy to do with the old
bevy_easings
crate, that this crate was based on, because it dealt with the entireTransform
all at once.Here, you are providing separate "lenses" for translation, rotation, and scale, and all of them set the generic parameter on
Lens<T>
toT: Transform
, meaning that I cannot add multiple to the same entity simultaneously. There is no lens for working with the whole transform. :(So have you made it impossible to tween between two Transforms? Only leaving the possibility to operate on one field at a time?
The text was updated successfully, but these errors were encountered: