Jump to content


  • Content Count

  • Joined

  • Last visited

About Bladetrick

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. Hail! I was perusing the site and found the documentation on the action manager. So I created this playground to swap the camera target on double click. https://www.babylonjs-playground.com/#7JOOL#18 It seems to work ok but i noticed that when I change the camera target, the camera's pivot point stays the same. How do I get it to pivot around the selected mesh? Also, I noticed that sometimes I have to double click more than once to change target. Is that because I'm trying to swap too fast?
  2. I didn't know what to expect hehe. I just noticed it. I recognize the symbol for mesh but that was it. i guess i was thrown off by the fact that it had the same layer name. i'll look that transformNode thing up, thank you!
  3. Hello again, I downloaded the debug layer Inspector and started using it in a project. Here's what happens: 1. I load up a model and move the camera around it. (no problem) 2. Open the inspector and use it (no problem) 3. Move the camera again and get (edit: found out the error doesn't occur when mouse zooming in and out... only when mouse rotating) Unhandled exception at line 15475, column 147 in http://xxx/babylon.js 0x800a139e - JavaScript runtime error: InvalidStateError This behavior only occurs when then inspector has been opened and continues even afte
  4. hello! What does this symbol mean? I notice it has no visibility and no vertex count. Thank you, Carlos
  5. Ok, forget it all. I'm dumb. I'm so new to this still that I was making things overcomplicated and also noticed i was looking at(and using) the wrong set of coordinates. Yes, the meshes were returning 0,0,0; however, the closest facet i calculated had real values that I can work with. Thanks all. Helped a lot to work it through.
  6. I apologize, I didn't give enough information. Here's situation. 1. Object is loaded. This works. 2. I read some data points in from a database and create spheres at those locations. This works. 3. Determine closest mesh to sphere. This works. 4. Determine closest point on closest mesh to sphere. This is where I get the 0,0,0 Doesn't work so the rest don't either 5. Cast ray from sphere to closest point on closest mesh. The meshes are stationary and will not move, rotate, translate, etc. The only movement is from the camera. Its probably just a matte
  7. this OBJ file was generated with 3DS Max. Another odd thing i noticed is that there are multiples of each mesh. Like there are 5-7 meshes that get generated for steering wheel, for example
  8. Both position and getAbsolutePosition() come out with 0, 0, 0 for all meshes
  9. From the links suggested I figured out how things worked; however, I have another problem on my end. I started a new topic here in case anyone wants to take a looksee: Again thanks for all the advice up to this point
  10. hello! I have an OBJ file that contains a vehicle. The vehicle has multiple layers to it (left front tire, passenger door, etc), each one loading up as its own mesh. I am starting to notice that, though the model loads correctly and looks fine, the mesh.positions are all listed as [0,0,0]. When trying to cast a ray from some arbitrary origin vector to the closest mesh, they all shoot to the world's 0,0,0 and, either miss the target completely (no hit) or hit some other mesh that's in the way. Any thoughts on how to find the real locations of these meshes? Thank you.
  11. i used getClosestFaceAtLocalCoordinates and it works, though the point it came up with is not the closest that I can see. i don't know. I'll do some more reading/testing and let you know my results. Thanks all, for the help/ideas!
  12. You're right, Jerome. I rearranged it and got it to load properly; however, my point (a sphere) is close as heck and it still gives a value of null. https://www.babylonjs-playground.com/#UZGNA#13 Not sure what I'm doing wrong. I'm just trying to cast a ray to the closest facet/point
  13. Thanks, that's giving me a good starting point to work with. I'm reading on partitioning more carefully and playing with the updated playground. Question, though: When using var index = mesh.getClosestFacetAtCoordinates(dot.position.x, dot.position.y, dot.position.z, nearestpoint); on the playground I get the following error: Line 38:22 - Cannot read property 'getClosestFacetAtCoordinates' of undefined even though the intellisense picked it up fine. am I doing something wrong here? Thanks again.
  14. Hello! I was noticing that .getClosestFacetAtCoordinates results in index == null given the parameters below. In what situation can this occur? The nearestMesh is valid from what I can see. It occurs fairly often in this set of data i'm using. nearestpoint = BABYLON.Vector3.Zero(); var index = nearestMesh.getClosestFacetAtCoordinates(-20.5, 115, 226, nearestpoint); // If i change the second parameter to 115 I get a facet index. if (index != null) { worldPos = nearestMesh.getFacetPosition(index); } I noticed that if i switch the second paramter's
  • Create New...