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) 