Update function

Hello,

I would like to write a function that will change the position of a 3D object every few seconds (similar as update function in unity). In javascript this is possible with setTimeout(), but I can’t use this function in zapWorks Studio (it gives me an error: ‘Cannot find name: setTimeout’).
Any suggestions?

Mark

1 Like

@mark.bogataj18
I think you want

Utility Functions

Z.every(…) Runs a function repeatedly after the specified time has passed.
Z.everyOff(…) Stops a function that had been previously scheduled with Z.every(…) from being called again.

Steve

1 Like

Yes, I think this will do the trick. Thank you! :slight_smile:

1 Like