Hello
I got a 3dModel of an elevator. I trigger a button for it's position with the following code:
myMesh.actionManager.registerAction(new BABYLON.InterpolateValueAction(BABYLON.ActionManager.OnPickTrigger, myMesh,"position.y",-2.6, 1000)) //down
.then(new BABYLON.InterpolateValueAction(BABYLON.ActionManager.OnPickTrigger, myMesh,"position.y",0.001, 1000)); //up
Witch works great!
Accept when my char wants to get up again, he is falling through the ground, - the mesh.
Few workarounds that come into my head, like check the state of the "event" an apply new gravity or new cam position.
What's the easiest one?
Any suggestions are highly appreciated!
Best