• Content Count

  • Joined

  • Last visited

About nathanidp

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. An example of something we try to do (it's not exactly the same but it's not that far)
  2. Sorry my answer came late, I tried to send it yesterday but Html5 blocked my message
  3. We changed the babylonjs-loaders version to 3.2 and it resolves our problem. There must be something that changed between 3.2 and 3.3 in the importMeshAsync function. We don't know how to repro it in the playground since we don't know what loader version is used and the files we are using are from a private link we cannot communicate... But here's how we call the function : return new Promise((resolve) => {( "", url, // The url of the blob "", that.scene, // our babylon scene null, this.fileExtension // ".obj" ).then((importedData) => { // We never get here ... (...) }).catch((err) => { // We never get here to ...; }); });
  4. Hello, We are using the SceneLoader.ImportMeshAsync function for our project. However in local there's no particular problem but when we deploy the project it seems that the function don't work well. The promise called with ImportMeshAsync seems to break and it never resolve (the callback function in '.then' is never called). We tried to do a catch but no error is catched. What we do is we are using a proxy because the .obj files are stored in another website. Then we create a blob from the returned data by the proxy. Eventually we load the blob using the ImportMeshAsync function. We tried to put some breakpoint on the promise call in the browser (it don't work with every browser) and the weird thing is that ImportMeshAsync returns a string in the deployed project but it returns a mesh locally. Thank you for your help.
  5. Hello ! I'm currently using the rotation gizmo of babylon to rotate some objects. However I try to block the rotation if the mesh goes under the ground while rotating. I'm doing a test between the mesh.boundingbox.minimumworld.y and the ground.position.y but I don't know how to block the rotation correctly since the minimumworld.y is a float value which is already at the start less than the ground.position.y . Any help is welcomed
  6. That's a good solution. Eventually I did this :
  7. I tried to block by using "dragBehavior.releaseDrag()" but then I can't drag up again
  8. In this Babylon Playground I try to constrain the yGizmo of the position gizmo to prevent the sphere to go below the plane. My technique seems to be wrong. Any help to solve this ?
  9. Solved, I needed to run computeWorldMatrix(true) on my object and run the init() function on my pointerDragBehavior object
  10. Do you think there's a link between my problem and this issue : ?
  11. Currently i'm using the dragStart() function of the pointerDragBehavior. I have set the object position to (0, 1, 0) before creating the pointerDragBehavior and the planeNormal to (0,1,0), however when I run the dragStart() function, the dragPlanePoint is not right (y is 0) and the object y position goes back to 0 on drag. How do I update the dragPlanePoint when I run dragStart() ?
  12. I have an error which says that startDrag is not a function. My current version is "babylonjs": "^3.3.0-alpha.15"
  13. For performance issues I'm working with instance of mesh in my current project. Currently to use highlight when i select a mesh with the pointer I disable the instance and clone the original mesh but only to use the highlightlayer. I call it the selectionMesh. However I also want to drag the selectionMesh by adding a pointerDragBehavior to it but the selection (and the creation of the SelectionMesh) starts when the pointer is down. What I want is when i click on the instance i create the selectionMesh, disable the instance, add the behavior to the mesh AND start the dragging. Currently I must click once to the instance to create the selectionMesh and then click another time to start the dragging which is not what I need. Any suggestion ?