Tweening an vector isn't work if value of property is 0

Hi, I noticed strange behavior when I try to make “yoyo” and return vector to its zero value.

repeatTw() {
    const {vector} = this;


        .to(2, {x: 1})
        .to(2, {x: 0})
        .call(() => this.repeatTw())

if I write this code, vector.x become to value 1, but never return to value 0.
if I change second “x” property to 0.0001 it works.

I add test project you can look cube doesn’t return to “x” position 0:
Cocos Creator 3 preview. (1.2 MB)

Thanks for the bug report!

We have fixed this issue on the development branch, you can refer to the following code :


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.