Hello,
I have a request for NavMesh hopefully it is right to at @Cedric.
My wish:
I would like to have a callback function I can pass into the constructor of RecastJSPlugin. When this callback function is present, the update() function in RecastJSPlugin would pass the new positions to the calllback function, instead of directly updating the positions of transform nodes. To avoid disrupting the existing api, this callback can be optional and when it is omitted, direct position update to the transform nodes is applied.
Why I want to have this api:
I use babylon.js with react and follows the flux pattern. Basically, actions such as user inputs trigger changes to a central state; the central state notifies the react app to update and notifies changes in babylon scene. For example if I want to move a mesh, mouse click on a target destination is the action. I keep the position of the mesh in the central state. I would like to implement the update of position to the central state in the callback function I wish to have. And when the central state is updated, it will notify the observer to update the transform node position on the 3D scene as side effect.
I think this pattern helps to separate the app code logic from rendering. For example, if I have modules for save the position of the mesh, or if I have another logic that need to take the mesh position into consideration, these modules only need to access the central store. They don’t need to read directly from the mesh.