Jump to content


  • Content Count

  • Joined

  • Last visited

About Carharttguy

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. @Temechon, that's it. Stupid of me. Again a lifesaver, you are. For future reference, I changed the code to: And this works.
  2. Hi JohnK I meant you can see the red dotted line under diffuseTexture in my code. params[2] is something like this: /ED045E97A673F1D9F637F2198E3FB64C885940EE/files/0947-8748-9565-6312-6800/chest.png This may look like an odd value, but is a correct path. But it never gets loaded, because EntityToTexture.material.diffuseTexture.dispose() doesn't get called in the first place, because material.diffuseTexture isn't found. I get the same problem when I just try to define a new material like this: See the code hinting: And the red dotted line again, showing the error: Real
  3. Hello I have this situation: I load a .obj file without a .mtl file and set the material manually this way: This works, but than, somewhere else in my code I try to get that mesh and set some material properties: As you can see, I get an error on the material.diffuseTexture property. I thought it maybe was an error with the .d.ts file in Typescript, but the Javascript console also throws this error. How is it possible that material.diffuseTexture is not found? Edit: Other material properties do actually work, the .wireframe boolean works as expected. Thanks
  4. Hi Deltakosh, Yes, only the groundmesh and the chest mesh.
  5. Hi Temechon, thanks for your reply. No I didn't use the camera parameter. My old code was: let pickresult = gEditor.getScene().pick(mouseX, mouseY); New code: let pickresult = gEditor.getScene().pick(mouseX, mouseY, null, true, gEditor.getCamera()); But the result is exactly the same, the code for setting the mesh position is simply: gEditor.getAttachedMesh().position = pickresult.pickedPoint; It's not a huge problem for me, I just find it odd.
  6. Hello I use the scene.pick function which is very nice. But I notice is it off on larger distances, is this because of JS number accuracy or is something wrong with the pick function? I've made a small gif to show the problem. First close up, good, then a bit further, and you can see the chest is below the mouse pointer, like 20 px or so. Thanks for insights Mathias
  7. Thanks (again) adam. I always end up getting lost in the github folders. It's like a maze for me. I bookmarked it
  8. Hello Can I download BJS 2.5 somewhere? I have a bug and want to test it with the older version. Thanks!
  9. Hello I tried to import a file with the assetloader. This works, the file is loaded but gets another name than expected. Is the name an internal obj file name or something? And second, after loading the asset, I cannot access it via scene.getMeshByName. See playground here: https://www.babylonjs-playground.com/#ZJYNY#25 As you can see, the name of the skull.babylon file is "test" as returned via the alert. But then accessing the file via scene.getMeshByName("test") returns null. Where is my logic flawed? Thanks for insights!
  10. Little side question: Why are the loadedMeshes abstract meshes? Is it safe to typecast them to meshes?
  11. Hi @davrous, thanks for your fast answer. I found the problem. The error shown was something like this: TS2099: loadedMeshes not found on IAssetTask. So i figured I should've defined the type of 'task' this way: And this works. Wouldn't it be an idea to also have TypeScript examples in the docs? So the reader can choose which code examples are shown? I'm willing to translate the parts I can. Also poking @Deltakosh for this.
  12. Hello I'm learning the AssetsManager, but I bump into this problem: But one way or another, task.loadedMeshes doesn't exist. How is this possible? Edit: I also should call .load first, but I don't think that's the problem here. Thanks!
  13. Thanks folks for the fast replies! @adam Stupid of me! Thanks for the degrees to radians knowledge. Can I change the docs in any way? Because this isn't mentioned in the docs, or I didn't see it. @others, also thanks for the solutions, but I think the solution of adam is the cleanest, just setting the rotation of the camera, and not of a parent mesh attached to the camera.
  14. Hello I'm trying to rotate a FreeCamera, but setting the rotation doesn't seem to do anything. See this PG: https://www.babylonjs-playground.com/#85JMWB#1 I expected the camera to be turned 45 degrees to the right, but setting a value doesn't do anything. Where does my logic fails? Thanks!
  • Create New...