Strange behaviour when repeating RotateAction with a delta
mattiashagstrand opened this issue Β· comments
If you try to repeat a RotateAction with a delta the rotation is reset to the original value each time the rotation action repeats. I expected the rotation to continue at a constant rate until cancelled.
Example code:
actor.repeat(RotateAction(delta: 3.14, duration: 1))
I think all that is needed is to add this function to MetricAction:
public override func start(for object: Object) {
startMetric = nil
}
This is consistent with how MoveAction is implemented.
Hi @mattiashagstrand π
That's definitely a bug! Do you want to submit the fix you suggested as a PR? π
Absolutely, I will create a PR!
Awesome π
Hmm, looks like I don't have permissions to create a new branch from master. How can I fix that?
@mattiashagstrand Fork the repo, make a new branch on your fork, then submit it as a PR π
Fixed by @mattiashagstrand in #84 π