Search the Community
Showing results for tags 'snapping'.
-
Hello all, I feel as though I'm being hard of thinking here. Here's a PG: http://www.babylonjs-playground.com/#3ENM44#1 How do I make any one of the boxes stop moving when it hits another? I have got as far as it logging to the console when the ellipsoids collide - not what i want though. This needs to be accurate to .001 scene units (a millimetre for my setup). Think I'm going about this the wrong way. Importantly, I need to get this working with the gizmo. Any help would be much appreciated. Thank you.
-
Hey all, I'm looking for some direction on snapping objects into position against other objects edges. I'm also looking to define a snap point on an object and use that to lock it into another objects corresponding point. The first problem is essentially voxel drawing with irregular sized objects (all prisms), I need to be able to click on a face and have the new object placed in relation to the face that I clicked. So if I cast a ray and it finds the top face of an object, the new objects bottom face should align with it. (and snap to whichever side edge the mouse was closer to?) I imagine the second problem as having a little sphere attached to the objects mesh in an arbitrary location, and using that spheres center point to snap into the nearest objects corresponding anchor point. Like defining a hook on an object and using it to snap onto a clothesline. The Babylon.js API is pretty huge and I'm not at all familiar with it, but I have a reasonable grasp of the concepts involved. Any direction or suggestions on how to make a system as I described work would be greatly appreciated.