Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action: RepeatForever: behavior with "...To" and "...By' actions. #2473

Closed
aismann opened this issue Mar 23, 2025 · 1 comment
Closed

Action: RepeatForever: behavior with "...To" and "...By' actions. #2473

aismann opened this issue Mar 23, 2025 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@aismann
Copy link
Contributor

aismann commented Mar 23, 2025

Source example:

    auto array = PointArray::create(20);

    array->addControlPoint(Vec2(0.0f, 0.0f));
    array->addControlPoint(Vec2(80.0f, 80.0f));
    array->addControlPoint(Vec2(s.width - 80, 80.0f));
    array->addControlPoint(Vec2(s.width - 80, s.height - 80));
    array->addControlPoint(Vec2(80.0f, s.height - 80.0f));
    array->addControlPoint(Vec2(80.0f, 80.0f));
    array->addControlPoint(Vec2(s.width / 2, s.height / 2));

    auto action  = CatmullRomBy::create(3, array);
    auto seq = RepeatForever::create(action);

    _tamara->runAction(seq);

Wrong behavior: see clip:

RepeatForeverBug.mp4

Fix:

RevertForeverBug1.mp4
@aismann aismann added bug Something isn't working cocos2dx The issue present in original cocos2dx labels Mar 23, 2025
@aismann aismann self-assigned this Mar 23, 2025
@aismann aismann removed the Axmol-v3 label Apr 4, 2025
@aismann aismann removed their assignment Apr 4, 2025
@aismann aismann added help wanted Extra attention is needed documentation Improvements or additions to documentation and removed bug Something isn't working help wanted Extra attention is needed cocos2dx The issue present in original cocos2dx pinned labels Apr 4, 2025
@aismann
Copy link
Contributor Author

aismann commented Apr 6, 2025

I close it and remove the tags and add 'documentation'?
Reason:
After some more test I think RepeatForever works correct:

Using CatmullRomTo reapeat on the "start point"
Using CatmullRomBy reapeat on the "end point"

Same behavior for all "...To" and "...By".

@aismann aismann closed this as completed Apr 6, 2025
@aismann aismann changed the title Action: RepeatForever: wrong behavior with open splines Action: RepeatForever: behavior with "...To" and "...By' actions. Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant