• Content Count

  • Joined

  • Last visited

About PavolHejný

  • Rank
  • Birthday 09/08/1993

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Czech republic

Recent Profile Visitors

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

  1. Hi, I am working with WebVR in BABYLON.js. And when I use WebVRFreeCamera (either directly or via. WebVR experience helper). On the screen (canvas in a browser window), the image is split into two eyes. I suppose that is because of performance. Can I somehow render there only one view? Thanks for your suggestions.
  2. @trevordev Thanks a lot. Your code is working perfectly!
  3. Hi, I am using Babylon.js with HTC Vive and WebVR and I want to pick a point on the mesh (this.wallMesh) with controller ray. I don't want to use default VRHelper interactions. I expected that this code should work for it but it seems that there is wrong rotation because the rotation of the device behaves totally weird. Do you have some tips on how to fix it? Thank you a lot. const pickMesh = BABYLON.Mesh.CreateSphere( 'pickMesh', 5, 0.1, this.scene, ); const ray = new BABYLON.Ray( BABYLON.Vector3.Zero(), BABYLON.Vector3.One(), 100, ); this.scene.registerAfterRender(() => { ray.origin = controller.devicePosition; ray.direction = controller.deviceRotationQuaternion.toEulerAngles(); const hit = this.wallMesh! .getScene() .pickWithRay(ray, (mesh) => mesh === this.wallMesh); if (hit) { console.log(hit.hit); if (hit.pickedPoint) { pickMesh.position = hit.pickedPoint; } } });
  4. Hi, I am creating WebVR app with Babylon.js (using Firefox, SteamVR and HTC Vive). Can I somehow start VR without users initial click. When i create WebVRFreeCamera: const camera = new BABYLON.WebVRFreeCamera("camera", BABYLON.Vector3.Zero(), scene); I can start VR with: scene.onPointerDown = function () { camera.attachControl(document.getElementById('scene'), true); }; or scene.onPointerDown = function () { camera.getEngine().enableVR(); }; but when i do it without onPointerDown callback it does not work: const camera = new BABYLON.WebVRFreeCamera("camera", BABYLON.Vector3.Zero(), scene); camera.getEngine().enableVR(); Also when i wrap it with setTimeout it does not work: const camera = new BABYLON.WebVRFreeCamera("camera", BABYLON.Vector3.Zero(), scene); scene.onPointerDown = function () { setTimeout(()=>{ camera.getEngine().enableVR(); },100); }; Does enableVR method needs onPointerDown event context. Or where is the problem? Thanks a lot for your advice.
  5. Thanks for every advice. @Arte Setting inital velocity is good and easy hack for some cases. @brianzinn I think that is exactly the problem of Oimo. Oimo is physics in vaccum - everythink is falling with same acceleration. @Pryme8 Perfect hack!
  6. Hi, Can I somehow (with physics plugin Oimo.js) set different gravity for different meshes? For example I want to simulate environment in water and I want to have there buoyancy. Thanks a lot for your advice.
  7. Thanks! That was exactly what I needed. And now I better understand how textures and meshes works.
  8. Hi, I have some questions about BABYLON.Texture. I have a bricks texture, a big house and a small chimney. I want one brick to be the same size on a house and on a chimney. I can set size of the texture by uScale,vScale, but I would not like to create a special texture for every mesh as I suppose it would be very inefficient. Can a Babylon texture cover the area by size instead of percentage? Best comparsion of my problem is comparing with css background-size: CSS background-size: 100% 100%; is like uScale=1 and vScale=1 in Babylon. Is there anything like background-size:100px 100px; in Babylon? Thanks a lot for your advice.
  9. Thanks, Now I understand what is happening much better.
  10. Hi, I'm making the game using the Babylon.js and Oimo.js. I want to put cubes one to the other and create bigger buildings - just like wooden domino or jenga cubes in real world. But if I put a lot of cubes one to the other, they will start to shake and the whole building will collapse. I can not figure out why this is happening? Can I somehow get rid of this vibration? Thanks a lot for your advice.