JohnSundell / JohnSundell/ImagineEngine

Repeat action causes small stutter

Open
#102 6 comments 0 reactions 0 assignees View on GitHub
bug discussion
Dominant language
Swift
Stars
1.8k
Forks
104
PR merge metrics
No merged PRs in 30d

Description

When repeating an action (e.g. rotation) each time the action repeats their is a small stutter.
This is caused by the action reset because an action rarely ends at a completion ratio of exactly one.

Changing

```swift
internal func reset() {
startTime = nil
lastUpdateTime = nil
}
```

to

```swift
internal func reset() {
startTime = lastUpdateTime
}
```

in ```Action``` seems to fix the problem in the case when an action is repeated but could potentially cause problems in other cases. Maybe ```Action``` should have a ```restart```method? In that case the responsibility for calling ```reset```or ```restart``` probably needs to be moved out of ```ActionWrapper```.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.