Jump to content

Search the Community

Showing results for tags 'picking'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 24 results

  1. Hi there, learning Babylon.js since 2 days I've created a "container" mesh (with no geometry), and then added to it 2 children meshes, a box and a sphere. I would like to pick the container mesh on mouseClick event, but actually either box or sphere get selected. Is there a way to ignore submeshes? I know there would be many workarounds, like for example creating the container as a box with a transparent material, but I was just wondering if there was a flag/parameter a can set when doing raycasting. Here you can find the PG: https://www.babylonjs-playground.com/#BD4L6U
  2. Hi, Is there anyway to pick a bounding box? I know I can pick a mesh using scene.pick but then pickInfo.pickedPoint will give me the point where the picking ray hit the mesh. What I would like to get is the point where the picking ray hit the bounding box of the mesh. How can I do that? Thanks!
  3. Hey guys... while refactoring some code, I ran off down the path of changing my old picking method (Raycasting, etc) to use actions... specifically OnPickTrigger with ExecuteCodeAction. But... I was a bit confused when I could not find the picked point on the mesh in the event data. Am I missing something?
  4. Hi guys I just started getting into BabylonJS and I really like the simplicity of it, is elegant I have a question about how low level can I get with Babylon, I want to make a 3D modeling application, similar to what Clara.io is doing I know they are doing it in Three.js and I did a first prototype with three.js but I'm not happy, it got really messy really quick. So a few things I would was to do is, selecting individual vertices of a mesh, selecting faces and edges creating geometry on the fly, for making tools to extrude faces etc. also support for quads in meshes not just triangles
  5. Hi Folks, I wrote a small selection effect like in the playground http://www.babylonjs-playground.com/#2EHGYF#7. Actually I add cloned meshes on top of the originals. This seems to work perfectly but every time I select, unselect a mesh, I need to update the Octree. I am working on a similar effect on highlighting when the hover the mouse on the meshes. I am not sure if the performance can be OK with large models. Is there any way to handle this? I mean maybe I can have another scene or...the Octree can be applied only on the main scene? Many thanks
  6. Hi Guys, I am doing selection by adding a pointer observer like below. But there is one thing that this can not work which is clearing the selection(s) when clicking on the "empty" place. I know that I can add an observer with POINTERDOWN(or POINTERUP), but what I wish is when I rotate the camera by left click + dragging, the "selection event" will not be triggered. Only when I click at the empty place without rotating the camera, the selection will be cleared. How can I do this though? addPickingObserver(observer: (eventData: BABYLON.PointerInfo, eventState: BABYLON.EventState
  7. Hi everybody: I have a doubt on registered Actions, is possible to retrieve the pickedPoint from the callback parameter? I mean something like we have with Observables via the "d" param (d.pickInfo.pickePoint), in order to avoid to implement always the pick-result-check as shown in the following code (excerpt): myMesh.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickDownTrigger,function(evt){ var pickResult=scene.pick(scene.pointerX,scene.pointerY); if(pickResult.hit){ ... } })); Best regards.
  8. Is it possible to pick hidden objects in a scene? If so, how is this achieved? Thanks in advance
  9. I just found out that picking with fastcheck set to true doesn't work as expected. It won't give you the closest mesh but the one added to the scene first! The problem is inside _internalPick function. I added a comment where it literally breaks the search for the closest hit. private _internalPick(rayFunction: (world: Matrix) => Ray, predicate: (mesh: AbstractMesh) => boolean, fastCheck?: boolean): PickingInfo { var pickingInfo = null; for (var meshIndex = 0; meshIndex < this.meshes.length; meshIndex++) { var mesh = this.meshes[meshIndex]
  10. Hi Everybody! So I have some hotspots floating around in z space. Each hotspot isPickable = true and each non pickable mesh isPickable = false. When I test on desktop it runs like a dream, but when I test it on mobile devices, the hotspots don't respond to any touch actions/click. Babylon version is v 2.5.0 I created a PG. The PG works great on desktop and mobile, but the PG is running version 2.6 alpha Is this something that was adjusted? Am I missing something? Can I change what version of Babylon being used in the PG so I can have a more accurate test? PG: ht
  11. Hi, I already replied to @faljses post in bugs section (link below) but I'm not sure this really is a bug so I'll try and ask here too if anyone knows a way to do this. So, I'm trying to use picking with an orthographic camera. My picking code works as long as I use a camera in mode=0 but in orthographic mode it never hits anything. Here is faljses playground example that shows that as soon as you change the camera mode to 1, the picking stops working. http://www.babylonjs-playground.com/#XUDHE I already searched the source for some hours by now to see if I can spot a
  12. Hi, I noticed picking doesnt work correctly when using an orthographic camera. I could reproduce the problem modifying your samples on playground: http://www.babylonjs-playground.com/#XUDHE Result is always false: {hit: false, distance: 0, pickedPoint: null, pickedMesh: null, bu: 0…} Is this supposed to work, or do i need to use a different method for ortho projection? faljse
  13. hullo guys, how's your shopping goingA? I need help with picking mesh in imported 3D scene, i've tried some codes but it's not working
  14. Hi! So I'm ultimately trying to pick some meshes with textures that have transparency, but when they overlap, the transparent parts of the mesh still get picked. Playground: http://www.babylonjs-playground.com/#1UCP5L If you open up the console in the playground and click the 2 black circles in the center of the overlapping "impact" textures, you'll notice that it always picks the 1st texture (although you're clicking on 2 separate "visible" textures if you take transparency into account). I thought perhaps I could test to see if the texture color at the UV coordinates of
  15. Hi guys, I have a problem with mesh picking and it is a specific case. When I create a ribbon like this, I can see it on the scene: var someRibbon = BABYLON.Mesh.CreateRibbon("ribb", [[new BABYLON.Vector3(0, 0, 0), new BABYLON.Vector3(10, 0, 0)], [new BABYLON.Vector3(0, 10, 0), new BABYLON.Vector3(10, 10, 0)]], false, false, 0, _scene, true, BABYLON.Mesh.FRONTSIDE); On mouse down I am writing the name of the picked mesh in the log: handleMouseDown: function(event){ var pickResult = _scene.pick(_scene.pointerX, _scene.pointerY); var pickedPoint = pickResult.p
  16. Hi, I have some meshes, created with PolygonMeshBuilder. They're not overlapping, but their bounding boxes are as you can see in the attached screenshot. I want to achieve pixel perfect picking for those. Using scene.pick without fastcheck for some reason still picks those meshes by bounding box. (In the attached screenshot - the green mesh is getting picked instead of the purple one) Any ideas? Thanks
  17. Hey guys, When you add actions to a mesh's instances, it affects the parent mesh and every instances. I'm not sure that's the behaviour you want, am I right ? You can see it in this playground : http://www.babylonjs-playground.com/#HZTM8 Thank you
  18. Hi, I don't know if you could really call this a bug or maybe it's working as intended and I'm doing it wrong... (sorry) If you get sufficiently close and intimate with a mesh you can't pick it. Here's a playground: http://www.babylonjs-playground.com/#1KNCOA The important parameter to look at is the Z coordinate of the camera. If I set it to -1.06 then I can successfully pick the front face of the box and distance to the box is 0.01. (I'm printing pickResult in the console) If I set it to -1.04 then I can only pick the back face of the box yet I can still see the front
  19. Whoa! Okay, there are two parts to this. Case/Issue 1: Scene picking info for animated rigs only obtains picking information from the first frame of the rig animation. I've setup a test case, http://jsfiddle.net/7x0nkh0g/3/ , where there's this cube that is being animated and moved by this bone. You can click on the cube to change it's colour between green and red. Clicking only works if you click on the mesh where it was at the first frame of animation. Doesn't canvas picking info casts a ray into the scene and looks for active faces everytime? It appears that it's using the first frame o
  20. I am using the virtual joystic camera to move around in my scene for users who are using ipads. The VJS camera works perfectly, but how do I allow users to pick objects in the scene? is there a way to keep the joysticks fixed on the bottom of the screen and allow the user to still pick objects?
  21. I'm trying to pick this big gray sphere, picking works, but actually in strange way. It really works even I'm clicking out of sphere shape, and sometimes doesn't work while clicking on the sphere shape. What is a collider here? I've tried to draw bounding boxes, expecting to see how colliders look, but it's not connected.
  22. I working on my first game in Phaser, a pirate baking sim, where the player controls two hands using mouse and keyboard and interacts with items on the kitchen bench. BUT I got stuck on a specific problem: I would like to be able to find a point under the 'hands' of the arms, so that I can use that to add items in the correct place in the gameworld, and I want to use the same point to identify what is under the 'hands', so that the user can interact with and pickup items. The x and y coordinates of righthand.getBounds() are close to correct, but I suspect that is not the correct app
  23. Hey ho, another two quick (and hopefully easy) question, please have a look here: http://www.babylonjs-playground.com/#GQDHN 1) I am trying to create a tiles ground with 4 submeshes. I start with zero submeshes. I am pushing submeshes 4 times... I end up with 8 submeshes... ... ... eh? I feel like I am missing something here, please tell me what's going on. I assume the 8 submeshes are the triangles that I see in the wireframe... but why? 2) How can I pick a submesh? The scene.pick returns the clicked mesh, but how would I determine the submesh at the clicked position? (Edit: I search
  24. Hi Blender Community We have a problem with picking a mesh, i.e. selecting the desired object, and the rendering of certain elements. We have a .3DS file with our design which was originally created by Revit 2014. Since there is no exporter we installed the exporters for Blender version 2.73a and 3D Studio Max 2015. When importing the .3DS file into blender and back to .babylon I am able to successfully select the object via an EventListener by interrogating the PickResult. If we export this same file via 3D Studio Max I am not able to select the active mesh. The pickResult.pickedMesh
×
×
  • Create New...