I’m trying to ping pong in my update and it only seems to return back the value I pass it, never any other value.
protected update(): void{
var value = 0;
BABYLON.Scalar.PingPong(value, 1);
console.log(value);
}
>0
So could I get anyone else to confirm this is not working or am I doing something wrong?
Also is it possible to update on the Playground? Or return a Delta time?
I guess I’m getting confused on the “Back and forth” part: The returned value will move back and forth between 0 and length
Does that not mean that the value will constantly update, lets say I give it 0, and 10 should it not return:
[1,2,3,4,5,6,7,8,9,10,9,8,7,6,5,…]
I’m trying to scale up and down Make a UI element shrink and expand on an update.
@ycw yes thank you, I can use this. And also thank you Gijs!