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

actor.rotateTo and actor.repeatForever behave unexpectedly #635

Closed
eonarheim opened this issue Aug 20, 2016 · 3 comments · Fixed by #1896
Closed

actor.rotateTo and actor.repeatForever behave unexpectedly #635

eonarheim opened this issue Aug 20, 2016 · 3 comments · Fixed by #1896
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior stale This issue or PR has not had any activity recently

Comments

@eonarheim
Copy link
Member

Steps to Reproduce

In the physics visual test (in /sandbox/web/tests/physics/physics.ts) if you run the following code

edge.actions.rotateTo(Math.PI/4, .5, ex.RotationType.ShortestPath).rotateTo(-Math.PI/4, .5, ex.RotationType.ShortestPath).repeatForever();

The actor will rotate back and forth slowly as expected once, but then, oscillate back and forth very quickly spinning.

Expected Result

It should rotate back and forth slowly forever

Actual Result

Behaves strangely and osculates quickly back and forth instead of at the pace of the previous actions.
rotatebug

@eonarheim eonarheim added the bug This issue describes undesirable, incorrect, or unexpected behavior label Aug 20, 2016
@eonarheim eonarheim added this to the 0.7.1 Release milestone Aug 20, 2016
@jedeen jedeen self-assigned this Aug 22, 2016
@kamranayub
Copy link
Member

Word of advice: look at the constructor. Might be similar to #512

@jedeen jedeen modified the milestones: 0.7.1 Release, 0.8.0 Release Oct 4, 2016
@jedeen jedeen modified the milestones: 0.8.0 Release, 0.9.0 Release Dec 4, 2016
@jedeen jedeen modified the milestones: 0.9.0 Release, 0.10.0 Release Feb 7, 2017
@jedeen jedeen modified the milestones: 0.10.0 Release, 0.11.0 Release Apr 3, 2017
@jedeen jedeen removed their assignment Jun 10, 2017
@jedeen jedeen modified the milestones: 0.11.0 Release, 0.12.0 Release Jun 10, 2017
@jedeen jedeen added the on-deck label Jun 13, 2017
@jedeen jedeen modified the milestones: vNext, 0.12.0 Release Jun 13, 2017
@jedeen jedeen modified the milestones: vNext, Actions Jun 27, 2017
@jedeen jedeen modified the milestones: Actions, vNext Jun 27, 2017
@jedeen jedeen removed the on-deck label Aug 30, 2017
@kamranayub
Copy link
Member

This also applies to moveTo, moveBy, and easeTo (the first time it repeats)

@github-actions
Copy link

This issue hasn't had any recent activity lately and is being marked as stale automatically.

@github-actions github-actions bot added the stale This issue or PR has not had any activity recently label Dec 27, 2020
eonarheim added a commit that referenced this issue May 19, 2021
Closes #1891
Bonus Closes #635 

## Changes:

- Changes the repeat/repeatForever api to be more clear (breaking change, no longer introspects the current action queue)

```typescript
 a.actions
    .easeTo(10, 100, 1000, EasingFunctions.EaseInCubic)
    .delay(250)
    .repeat(repeatBuilder => {
      // Specific actions to repeat
       repeatBuilder
        .easeTo(100, 100, 1000, EasingFunctions.EaseInCubic)
        .delay(250)
        .easeTo(10, 100, 1000, EasingFunctions.EaseInCubic)
        .delay(250)
     }, 2); // Repeats twice
   ```
- Light refactoring to actions
   - Separate action types into separate files
   - Change ActionContext to only support 1 actor at a time (multi actor unused after groups was deprecated long ago)
@jedeen jedeen modified the milestones: actions, 0.25.0 Release Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior stale This issue or PR has not had any activity recently
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants