Hi Anes and all helpers. Ya know, I think @adamās and @Necipsā escalator looks pretty good (theyāre both geniuses, ya know?)
So⦠I merged their code into your scene, added a (bad Wingnut-codedā¦) direction-adjusting system, and hooked up the GUI buttons.
https://playground.babylonjs.com/#KI8BJH#10
It still needs rotating and size-adjusting, and, to be frank, I have no idea how to do that (to that gorgeous sinusoidal escalator formula of Adamās/Necipās). We might need to rotate entire main model.
Scary stuff, but, damn⦠these guys are as smart as they come, eh? Math Gods. (sigh, drool, envy, etc). Thanks for the assistance, guys! Well done!
And Anes⦠you are/were advancing real well⦠in your previous playgrounds. I can see your deductive reasoning and brave experimenting at-work⦠and you are surely headed towards becoming a BJS pro. But this algorithm/formula⦠is/was semi-complex, so we should probably TRY to use what the guys have built for us, somehow. You gotta admit, it looks pretty darned nice.
I lead you astray with the moveTo function. We needed a better animator than that, one with an onAnimationEnd callback function⦠so you could hide the end-around stair-step during the long-move, and NOT use moveTo for that move. Instead, set its .visibility=0 and then make it JUMP to the other end⦠with a quick step.position = someVector3. Possibly, a real HIGH SPEED moveTo would work, but still, our moveTo has no onAnimationEnd⦠and we needed that⦠for the āhidingā.
There were other logjams, too⦠because⦠I was hurrying and hadnāt let smarter people than I⦠reply. Sorry about that. And again⦠you were/are doing a great job with BJS so far⦠but your project is a ābig gulpā⦠complexity-wise.
Perhaps⦠we can beg Adam/Necips/others⦠to help us āapply itā to your mostly-disabled main model. (fingers crossed) 