The first level works fine, in the second, the player figurine suddenly doesn’t tween, and instead the enemy tweens, and the player gets “teleported” at the end. The player doesn’t fire the event after his tween, but calls the callback right away. Error must be on line 108 in player.js.
I know Tweenlite shouldn’t have callbacks in brackets, but if I remove them, nothing happens at all (onCompleteScope is set)…
It may be a bit much, but if someone could have a look into it, and help me, I would appreciate that gesture a LOT.
Anyway, when you make this change, the character just jumps from point to point instead of tweening in the first level. This is because this.myTurn is always false. In the input function, it’s set to false, but never set to true again, which prevents this clause from being called:
if(this.myTurn===true){
this.entity.setPosition(this.coordinates.x,this.coordinates.y,this.coordinates.z);
this.entity.setEulerAngles(this.rotation.x,this.rotation.y,this.rotation.z);//...and Rotation to whatever may be in Tween.
}
I’m reactaviting this thread with the hope you are still in there Greg.
Would you mind detailling how you implement Tweenlite in playcanvas?
I would use it ( and Tweenmax / Gsap) but I’m not sure of what to implement as a lib. Which .js have you added to your project and how do you call your tweenlite.
A very basic example project of a cube moving would help a lot