Jump to content

Search the Community

Showing results for tags 'boundingbox'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 11 results

  1. Hi together, can someone explain me the behaviour of the following: Step 1: creation of 4 boxes: let box = new BABYLON.MeshBuilder.CreateBox("0", 1, scene); let box1 = new BABYLON.MeshBuilder.CreateBox("1", 1, scene); let box2 = new BABYLON.MeshBuilder.CreateBox("2", 1, scene); let box3 = new BABYLON.MeshBuilder.CreateBox("3", 1, scene); box1.position = new BABYLON.Vector3(7,0,0); box2.position = new BABYLON.Vector3(8,0,0); box3.position = new BABYLON.Vector3(9,0,0); Step 2: now lets group boxes 1, 2 & 3 and apply rotateAround: box3.setParent(box2); box2.setParent(box1); box1.rotateAround(new BABYLON.Vector3(7,0,0),BABYLON.Axis.Y,Math.PI/2); For me it seems that the grouped boxes are moved to (0,0,0) after the rotation. Or am I getting something wrong? See your self: https://playground.babylonjs.com/indexStable.html#T99QF6#1 --> Also: I want to create two abstract methods (1) Rotate an arbitrary mesh (having children) around it's "Center". (2) Position an arbitrary mesh (having children) sucht that it's top left corner is at some target coordinates. I always encounter problems with getting the current Boundingbox (even if I calculate it recursively by merging the bounding boxes of the children). I almost feel like I am not understanding something entirely. How would you implement such a method? Thanks for helping ;)
  2. I have searched through the documentation but i seem to have problem with increasing the bounding box around a mesh
  3. Hello, As far as I understand ray picking shouldn't depend on bounding box. But, when I change mesh's bounding box for some reason it affects picking. Playground that reproduces this behavior I would expect both spheres picking to act the same. Tomer.
  4. Hello all, I just finished the migration to the new Babylonjs and all dependencies for my project. now i'm pointing to the latest builds directly from URLs. Something that i could not fix and that was working before is the showBoundingBox attribute in mesh, it looks like that Babylonjs is generating a wrong mesh fro the bounding box. It's reproducible in Playgroundground, tested on Firefox, Chrome and MS Edge http://playground.babylonjs.com/#07U3EY Best regards DarkLight
  5. Hi, when using var hitInfo = scene.pickWithRay(ray, null, true); I would expect that the ray only checks the boundingboxes and not the mesh. So if I import an "open package" where the ray can go through the object without collision, I want to check only if the ray hits the boundingbox, but this doesn't seem to work. Here is a playground: http://www.babylonjs-playground.com/#5PMLFP Thanks, Steffen
  6. Hi, I'm trying to show the bounding box of a subMesh only. So I tried: scene.getBoundingBoxRenderer().renderList.push(subMesh.getBoundingInfo().boundingBox); scene.getBoundingBoxRenderer().render(); and the same thing with creating a new BoundingBoxRenderer but nothing append... Using mesh.showBoundingBox = true; and mesh.showSubMeshesBoundingBox = true; always show ALL the bounding boxes... So, is it possible to do what I'm expecting or am I just doing something wrong ?
  7. Hi, Here's an example of what I am trying to do: http://www.babylonjs-playground.com/#N9MYJN#2 I should see my four corners appear around the sphere on the 2D canvas, but for whatever reason they do not show up in the correct spot. Thanks, -StarToaster
  8. hi all, i'm trying to calculate the boundingbox of a parent mesh, so that i may get a good camera asprect. but failed to get the boundingbox size of the parent. are there any tricks there? pg http://www.babylonjs-playground.com/#QVIDL9 // Our built-in 'sphere' shape. Params: name, subdivs, size, scene var sphere = BABYLON.Mesh.CreateSphere("sphere1", 16, 2, scene); // Move the sphere upward 1/2 its height sphere.position.y = 1; // Our built-in 'ground' shape. Params: name, width, depth, subdivs, scene var ground = BABYLON.Mesh.CreateGround("ground1", 6, 6, 2, scene); var parent = new BABYLON.Mesh("parent",scene); sphere.parent = parent; ground.parent=parent; parent.showBoundingBox =true;
  9. I'm having issues with parts of my model not showing when it extends beyond the bounding box at the edge of the screen. I tried using the extendSize property, but it doesn't seem to have any effect. Has anyone had any success with updating the size of the bounding box?
  10. Im trying to do a hit test on a skinny mesh, so i want the meshes hit box area to be bigger than the actual mesh so that its more user friendly. I have tried to make its bounding box bigger, but that doesn't work. Is there a way to do a hit test on the bounding box area? Example of what i am trying to accomplish that doesn't work. http://www.babylonjs-playground.com/#EAR83 Also instead of using action manager i have tried just doing a hit test every fram using jquery and scene.pick. This also doesn't use the bounding box info. Coded as such: $('#canvas').mousemove(function(evt) { var pickInfo = Editor.scene.pick(Editor.scene.pointerX, Editor.scene.pointerY); if (pickInfo.hit) { console.log(pickInfo.pickedMesh.name); } });Any help would be appriciated. Thanks.
  • Create New...