Greetings,
i have an issue, a strange issue:
i assigned a tweenscale to a 2d UI panel, wich is enabled on button press.
The problem is the tweenScale apply only the first time i press the button, then it doesn’t work anymore. The ui is enabled, but the tweenscale work only the first time.
You should clone the original scale and use it for tweening, instead of using the scale of an item directly. When you use it directly, it will originally work, since “from” and “to” value will be different. After that the “from” value will be same as “to”, so you won’t see any visual changes.
var from = entity.getLocalScale().clone();
entity.tween(from).to(new pc.Vec3(3, 3, 3), 1.0, pc.SineOut)