Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by rgalindox

  1. Hi, I figured out : now I need to see the collision function myRay(){ var door = scene.getMeshByName("mesh1"); var punti= scene.getMeshByName("mesh2"); var origin = door.position; var forward = punti.position; var direction = forward.subtract(origin); direction = BABYLON.Vector3.Normalize(direction); var length = 20; var ray = new BABYLON.Ray(origin, direction, length); let rayHelper = new BABYLON.RayHelper(ray); rayHelper.show(scene); }
  2. Hi, I'm trying to create a ray from one mesh to another one, but I have problems with the direction. I'm using this one: var ray = new BABYLON.Ray(); var rayHelper = new BABYLON.RayHelper(ray); var localMeshDirection = new BABYLON.Vector3(-1, 0,0); var localMeshOrigin = new BABYLON.Vector3(0, 0, 0); var length = 20; var door = scene.getMeshByName("shop08"); rayHelper.attachToMesh(door, localMeshDirection, localMeshOrig
  3. Thank you very much. I'll check the links you kindly sent me. I appreciate your support to this forum! Rafael
  4. Hi, We are creating some 3d apps for web and web mobile so Unity3D can't do the job for mobile web. We need to have 3d text on top of some 3d objects, the text needs to be created dynamically so we can't import it from Blender or another 3d authoring tool. What library do you recommend to add to Babylon to have 3d text? I tested the 3d GUI but you need to have buttons and the requirements is 3d text similar to what UNity3D offers. Any help will be appreciate it.
  5. By the way, I know this is another topic. How do you add 3d Text in Babylon? not as a GUI but as a mesh. Thanks
  6. Sebavan, you're a genious!!! you saved me 😀 It works a charm! Thanks for the prompt reply. I appreciate it a lot! Rafael
  7. Hi, Hope I'm clear with my explanation: I have a Babylon scene and when it is alone (no other div on the html that has the canvas) the OnPointerOverTrigger works perfectly. However, when I put the canvas inside a <div> the OnPointerOverTrigger seems shifted, I mean, when I hover over the mouse over the mesh the action starts outside the mesh. I need the scene to be inside a div as I'm using w2ui as the GUI interface of the application. Attached one example: camera.html and cameraGood.html camera.html is the one with the issue, it only adds these lines:
  8. I'm playing around ribbons and they are awesome, as I can to my lines in parallel and then apply the ribbon, looks great! Do you know if the resulting ribbon is a mesh that can be clicked on? I'll test this shortly but wondering if you already tested this. Thanks
  9. Let me check the Ribbons and play with the billboard mode. Thanks
  10. Thanks Kesshi, I'm wondering how Unity implemented this when exporting to WebGL as it looks exactly as exporting to other platforms.
  11. Hello guys, I'm investigating BabylonJS for our next project at the company, we have our current application built in Unity and exported to WebGL, it is working pretty well however BabylonJS seems a great alternative in terms of portability to other platforms specially mobiles. We relay a lot on line renderers into the application as we crate many items on the fly, but I see the line function in BabylonJS doesn't support width. Someone has a workaround to have lines wider on scenes? I've tried tubes but they don't look very well compared to a line drawn on the fly as I have a function tha
  12. Hi, in which part of the code should I add the camera limits for the zoom? or when it is triggered? Thanks
  13. Thank you very much! I appreciate your help.
  14. Hi, I was able to make scenes using vanilla javascript and BabylonJS. Now I want to refactor all in Typescript as my background is with C#. Anyone has an example how to import a class from another file including what loader do you use, I'm getting this error on the web browser: Uncaught ReferenceError: define is not defined at game.js This are extract of the files: index.html <!DOCTYPE html> <head> <script src="js/babylon.3.0.js"></script> <script src="js/hand-1.3.7.js"></script>
  15. Hi guys, sorry for coming back to this thread. I'm importing a scene exported from Unity. I want the background to be green, but as soon as I import the .babylon scene it turns to black. This is the code: BABYLON.SceneLoader.Load("", "assets/myscene.babylon", engine, function (scene) { scene.clearColor = new BABYLON.Color3(0.5, 0.8, 0.5); scene.ambientColor = new BABYLON.Color3(0.3, 0.3, 0.3); If I create a scene without invoking the SceneLoader.Load the background color works fine. Any idea or hint is welcome.
  16. Thank you @Raggar I'll test it right away!
  17. Hi, I'm testing BabylonJS using Electron for Desktop-Multiplatform. It is possible to download the sponza project so I can test how well it runs loading all assets from a local Hard Disk using Electron? Thanks
  18. Great news!!!! I'll give a look to the links. Kind regards
  19. Thank you very much @JohnK, sorry I didn't explain myself correctly. I just want the normal parent child setting, so when I move the parent the child moves along. this is because I have a chain of 32 elements with a common parent. What I did for now was created the models and parented inside Unity and exported to BabylonJS, in this case it seems it is working correctly. But still doing some tests. Keep you posted. At the beginning as I come from the Unity world Babylon looks so complicated, but now I feel more comfortable and for basic stuff is not that complicated. My main concern for th
  20. Hi Guys, I'm testing Babylon for a new project. In Unity I have a parent object, and then setting up a child object is easy, in the Editor I move the object and I know the position and rotation, then I can write down the coordinates on the code. With Babylon I'm trying to do this but it's very complex as I have to move the object and test and test and test, It takes several hours to place the child object correctly. NOTE: The parent object position is not its center as I need to rotate it from another pivot point, so I can't use the parent's position to start moving the child
  21. Hi, when you export from Unity do you see your 3d models with smooth textures? I export from Unity and it is showing the texture like a low poly model, the texture is not smooth. Any recommendations? Thanks
  22. Thanks for the replies. I'll test the Append method. Is any of you having success importing FBX or OBJ objects to BabylonJS? I should have the objects on the scene (50 as I informed above) and then instantiate some of them several times. I can convert from FBX to OBJ, but reading some forums it seems it is not working well, but if you can have a link or steps to do it correctly I'll appreciate it a lot! Thanks
  23. Hi, I'm new with BabylonJS. I'm assessing it for a big project. I have a scene in Unity with more than 50 different assets all are FBX. How can I import 50 .babylon files, can you import more than one .babylon file? I thought the .babylon file is like as full scene.
  • Create New...