Hello fellow Babylon developers.
Playground link: https://playground.babylonjs.com/#NB1PQK#2
I have a plane mesh which I want to animate from xStart to xEnd
(note: xStart and xEnd not the actual names of variable just used for simplicity).
The function responsible for the animation I called “_layerLoop”
Every time the mesh reaches xEnd I want it to re-appear at xStart but I want the mesh’s z & y coordinates to be different - I want them re-rolled based on the coordinate limits specified by the input parameters.
Currently the only way to produce a variation in y and z coordinates using the existing playground example, is to refresh the page.
I have explored the document on observing events but was unable to achieve the desired outcome.
Is it possible to get the mesh to appear at different y & x coordinates every time the animation loops?
Any help is very much appreciated.
Thank you for your time.