Open
Description
Hey,
I was trying to have an object zoom into existence then wiggle infinitely... I tried doing that with:
Tween::new(
EaseFunction::QuadraticInOut,
Duration::from_millis(1000),
TransformScaleLens {
start: Vec3::ZERO,
end: Vec3::ONE,
},
)
.then(
Tween::new(
EaseFunction::QuadraticInOut,
Duration::from_millis(200),
TransformRotateZLens {
start: 0.05,
end: -0.05,
},
)
.with_repeat_strategy(bevy_tweening::RepeatStrategy::MirroredRepeat)
.with_repeat_count(RepeatCount::Infinite),
)
But when Running the first animation works well, however the second one panics with:
thread 'Compute Task Pool (13)' panicked at 'overflow when subtracting durations', library/core/src/time.rs:930:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The same happens if repeat_count
is set to a finite number even when set to 1
.
It might be that this is "known" or "intended" but if so it should probably be in the documentation for the then
method or the Sequence
type.
The Behaviour I expected would have been an infinite sequence first the zoom then forever wiggling...