Bladetrick

Members
  • Content Count

    57
  • 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. ugh, 3.3. thanks, appreciate the info
  2. Bladetrick

    What is this symbol in the Playground inspector?

    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 after the inspector has been closed. Also, once closed, the inspector will not come back up again when calling it. Only a refresh of the page resets things right. Anyone have any problems with this before? Edit again: oh and I just ran into Unhandled exception at line 1, column 104738 in http://xxx/Inspector.js 0x800a138f - JavaScript runtime error: Unable to get property 'dispose' of undefined or null reference when trying to close the inspector with its X button
  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 matter of me coding this wrong but here's a playground illustrating it: https://www.babylonjs-playground.com/#TRAIXW#16 In the playground I'm getting them to shoot to the mesh. but it is still hitting the center and not the closest point on the mesh. So that's one problem. Still having issues with my models having positions of 0,0,0 though on my project. Wish I could post those. Both rays shoot the center of the meshes instead of the closest point. eps, I inherited the meshes. Raggar, I checked and all the pivot points are centered to object, but I guess I don't understand why it matters if there will be no transformations on the meshes. Thanks all edit: side note... for some reason the rays are only visible from certain angles so you'll have to rotate. not sure why that is.
  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 value by just 2, I get an index back. Does this mean that the distance between the given point and a mesh facet has a limit for it to work? Thanks for the help!
  15. Bladetrick

    Material files for OBJ files

    So it turned out that, I had forgotten to include serving that extension in the mime settings of my web.config file. I'd gotten the OBJ, just forgot the MTL. Thanks for the help everyone