Skip to content

Improve capabilities of modifying Tweenables after creation #83

Open
@ivenw

Description

@ivenw

I have implemented a drag and drop system for Sprite and would like to build on this by having sprite ease back towards its original position after being dropped.

Here I came across some limitations of bevy_tweening.

For this I query Animator<Transform> in a system that checks for the Sprite position and whether it has been dropped. Today, there seems to be no way to update the TransformationPositionLens of the Tween of that Animator with a new start value, or change other fields of the Tween (as they are private).

The only way to get this working that I found is to use the set_tweenable method on the Animator to set a new Tween. I am not sure about performance impact, but it seems not an ideal way to do things. This also means that the Tween originally defined for this Animator is just unused boilerplate.

I would like to define an initial Tween and then change some of its parameters in a system call, without having to instantiate a new Tween.

I don’t know if this is in the scope of this crate or if there are technical reasons this is not possible, but this seems like an area where improved ergonomics would make bevy_tweening even more useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions