Skip to content

Allow me to declare an animation clip event based on a frame, not on a time #16973

Open
@ethereumdegen

Description

@ethereumdegen

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

The fact that i can only declare an animation event based on a time and not a frame is not only weird, but it is confusing and potentially even makes it impossible for me to do what i need to do (i am not sure?)

My running animation has a dynamic speed. So i need to be able to trigger events at particular frame indices. 'time' will not work if it is literally using time with no regard for the speed of the clip ( i dont know as this is not documented).

So what am i to do here? IMO either the documentation needs to be very very much improved in this regard, or (my primary recommendation) make these anim clip events be based on a frame index in order to make this clear and impossible to get wrong or mess up .

Example:


 anim_clip.add_event_to_target(
                    AnimationTargetId::from_iter( bone_names_array ), 
                    clip_time.clone(),   // makes no sense for this to me a time,  it should be a frame index 
                    anim_clip_event_type.clone()
                    );

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AnimationMake things move and change over timeC-FeatureA new feature, making something new possibleD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions