# \#collision-detection

**URL:** https://discourse.threejs.org/tag/collision-detection/236.md

[Latest](https://discourse.threejs.org/latest.md) · [Categories](https://discourse.threejs.org/categories.md) · [Tags](https://discourse.threejs.org/tags.md)

---

## [Best approach for magnetic snapping with hole validation using empty Object3D markers? Raycasting +Normals or](https://discourse.threejs.org/t/best-approach-for-magnetic-snapping-with-hole-validation-using-empty-object3d-markers-raycasting-normals-or/89792)

<div class="topic-metadata">

**Author:** [@Parisa\_Shahbazi](https://discourse.threejs.org/u/Parisa_Shahbazi)\
**Replies:** 4\
**Last updated:** [February 12, 2026, 12:43pm UTC](https://discourse.threejs.org/t/best-approach-for-magnetic-snapping-with-hole-validation-using-empty-object3d-markers-raycasting-normals-or/89792 "2026-02-12T12:43:47Z")

</div>

Project Summary I’m working on a 3D robotics construction (Robotic) platform for kids (ages 8-14) using Three.js. The project has been in development for a while, and I recently joined the team to implement new fea…

---

## [\[SOLVED\] Help with image meshes and meshes going off screen=](https://discourse.threejs.org/t/solved-help-with-image-meshes-and-meshes-going-off-screen/87791)

<div class="topic-metadata">

**Author:** [@Vasz\_Gul](https://discourse.threejs.org/u/Vasz_Gul)\
**Replies:** 1\
**Last updated:** [November 4, 2025, 11:35am UTC](https://discourse.threejs.org/t/solved-help-with-image-meshes-and-meshes-going-off-screen/87791 "2025-11-04T11:35:24Z")

</div>

Hi, I have a couple of things I would like to do with this code but I am having a lot of trouble figuring out the exact formatting for how to add the few more things I’d like for it to do. I’ve been looking around these …

---

## [Need Guidance: Best Frameworks for LEGO Model Editor with 3D Canvas, Drag & Drop, and Physics](https://discourse.threejs.org/t/need-guidance-best-frameworks-for-lego-model-editor-with-3d-canvas-drag-drop-and-physics/84938)

<div class="topic-metadata">

**Author:** [@ubaid](https://discourse.threejs.org/u/ubaid)\
**Replies:** 6\
**Last updated:** [July 9, 2025, 3:48pm UTC](https://discourse.threejs.org/t/need-guidance-best-frameworks-for-lego-model-editor-with-3d-canvas-drag-drop-and-physics/84938 "2025-07-09T15:48:55Z")

</div>

I’m building a web app that involves integrating LEGO-style models along with canvas-based interactions and editing capabilities. I’m currently a bit confused about which frameworks would work best for this setup, so I’m…

---

## [Collision detect between CSS2DObject-s](https://discourse.threejs.org/t/collision-detect-between-css2dobject-s/71185)

<div class="topic-metadata">

**Author:** [@emlem](https://discourse.threejs.org/u/emlem)\
**Replies:** 2\
**Last updated:** [July 7, 2025, 11:50pm UTC](https://discourse.threejs.org/t/collision-detect-between-css2dobject-s/71185 "2025-07-07T23:50:27Z")

</div>

Hello everyone! I need help with how to detect if one CSS2DObject overlaps with another CSS2DObject. The essence of the problem is that imagine a sphere, on the surface of which the camera is placed, and around the came…

---

## [Detect high speed collision: shot collision, bullet collision](https://discourse.threejs.org/t/detect-high-speed-collision-shot-collision-bullet-collision/80929)

<div class="topic-metadata">

**Author:** [@asdrubal](https://discourse.threejs.org/u/asdrubal)\
**Replies:** 4\
**Last updated:** [April 10, 2025, 6:48pm UTC](https://discourse.threejs.org/t/detect-high-speed-collision-shot-collision-bullet-collision/80929 "2025-04-10T18:48:02Z")

</div>

Using cannon-es: cannon-es What do you do to detect if a high speed mesh hits another mesh? I’m having a hard time trying to detect if a bullet (sphere mesh) hit the target (box mesh) at high speed (100). It’s easy to …

---

## [Self Collision of robot arm](https://discourse.threejs.org/t/self-collision-of-robot-arm/78378)

<div class="topic-metadata">

**Author:** [@Megha\_Sharma](https://discourse.threejs.org/u/Megha_Sharma)\
**Replies:** 5\
**Last updated:** [February 21, 2025, 7:18am UTC](https://discourse.threejs.org/t/self-collision-of-robot-arm/78378 "2025-02-21T07:18:01Z")

</div>

I’m trying to implement self-collision detection for my robot arm using the cannon-es library. However, I’m struggling with defining the mesh for my robot arm since I’m using a URDF file. I’m new to Three.js, so I might …

---

## [Three js move camera](https://discourse.threejs.org/t/three-js-move-camera/6852)

<div class="topic-metadata">

**Author:** [@M\_Mehdi](https://discourse.threejs.org/u/M_Mehdi)\
**Replies:** 4\
**Last updated:** [April 3, 2019, 2:32pm UTC](https://discourse.threejs.org/t/three-js-move-camera/6852 "2019-04-03T14:32:41Z")

</div>

hello friends I am new to three js and I have a question about collision detection. I have a scene with perspective camera and I put 20 objects like the spheres, the cubes and the pyramids in this 3D scene. I have mad…

---

## [What is causing the blue outliner cube to get into the right position after I hit a key on the keyboard in my code?](https://discourse.threejs.org/t/what-is-causing-the-blue-outliner-cube-to-get-into-the-right-position-after-i-hit-a-key-on-the-keyboard-in-my-code/77181)

<div class="topic-metadata">

**Author:** [@RickyLo](https://discourse.threejs.org/u/RickyLo)\
**Replies:** 0\
**Last updated:** [January 28, 2025, 1:51pm UTC](https://discourse.threejs.org/t/what-is-causing-the-blue-outliner-cube-to-get-into-the-right-position-after-i-hit-a-key-on-the-keyboard-in-my-code/77181 "2025-01-28T13:51:45Z")

</div>

I have this Three.js code and like for as basic as it is, is working fine at some degree. Whenever I drag the blue cube with TransformControls the blue cube detect collision but leaves a big gap in between while moving t…

---

## [Problems colliding models exported from SketchUp](https://discourse.threejs.org/t/problems-colliding-models-exported-from-sketchup/61575)

<div class="topic-metadata">

**Author:** [@edarblanco](https://discourse.threejs.org/u/edarblanco)\
**Replies:** 7\
**Last updated:** [January 21, 2025, 9:08am UTC](https://discourse.threejs.org/t/problems-colliding-models-exported-from-sketchup/61575 "2025-01-21T09:08:58Z")

</div>

Hello, I’m new here, but I’ve read a lot and learned a lot, thanks to all the knowledge shared above, so thank you too, now to what I’m talking about, I have problems when making simple collisions (AABB and OBB) with mod…

---

## [Looking for someone to help implement cube collision resolution using Mesh-BVH](https://discourse.threejs.org/t/looking-for-someone-to-help-implement-cube-collision-resolution-using-mesh-bvh/75423)

<div class="topic-metadata">

**Author:** [@Sidney\_Dev](https://discourse.threejs.org/u/Sidney_Dev)\
**Replies:** 8\
**Last updated:** [January 15, 2025, 5:24am UTC](https://discourse.threejs.org/t/looking-for-someone-to-help-implement-cube-collision-resolution-using-mesh-bvh/75423 "2025-01-15T05:24:36Z")

</div>

Im looking for someone to help me implement collision resoultion with cubes. Using the following library: GitHub - gkjohnson/three-mesh-bvh: A BVH implementation to speed up raycasting and enable spatial queries against …

---

## [Is there any libraries for realtime concave shapes collision detection?](https://discourse.threejs.org/t/is-there-any-libraries-for-realtime-concave-shapes-collision-detection/24336)

<div class="topic-metadata">

**Author:** [@Andrey](https://discourse.threejs.org/u/Andrey)\
**Replies:** 9\
**Last updated:** [December 26, 2024, 11:08am UTC](https://discourse.threejs.org/t/is-there-any-libraries-for-realtime-concave-shapes-collision-detection/24336 "2024-12-26T11:08:48Z")

</div>

Hello, I need maximum precision for concave object collision (or is it correct to call this “mesh collision”?) detection and would like to know if there is any way to detect concave (or mesh?) intersections fast enough (…

---

## [Camera collision in closed spaces](https://discourse.threejs.org/t/camera-collision-in-closed-spaces/71189)

<div class="topic-metadata">

**Author:** [@Soham\_Bhaumik](https://discourse.threejs.org/u/Soham_Bhaumik)\
**Replies:** 2\
**Last updated:** [September 26, 2024, 3:02am UTC](https://discourse.threejs.org/t/camera-collision-in-closed-spaces/71189 "2024-09-26T03:02:44Z")

</div>

Just looking for some additional advice here. I have written a player follow camera without using orbitcontrols. Used spherical coordinate formulae to update the mouse position on mouse drag. I raycast to the expected po…

---

## [Resolved: Bouding box is one move late](https://discourse.threejs.org/t/resolved-bouding-box-is-one-move-late/70468)

<div class="topic-metadata">

**Author:** [@Natalia\_Medrano\_do\_Nascimento](https://discourse.threejs.org/u/Natalia_Medrano_do_Nascimento)\
**Replies:** 4\
**Last updated:** [September 9, 2024, 11:55am UTC](https://discourse.threejs.org/t/resolved-bouding-box-is-one-move-late/70468 "2024-09-09T11:55:13Z")

</div>

I am trying to get an immediate real-time intersection. So, I want “intersection” to be printed in the console when the window bounding box intersects with the wall bounding box. However, I noticed that the window box is…

---

## [System lag when using 250000 raycasters](https://discourse.threejs.org/t/system-lag-when-using-250000-raycasters/67755)

<div class="topic-metadata">

**Author:** [@felix-kami](https://discourse.threejs.org/u/felix-kami)\
**Replies:** 6\
**Last updated:** [July 8, 2024, 11:13am UTC](https://discourse.threejs.org/t/system-lag-when-using-250000-raycasters/67755 "2024-07-08T11:13:58Z")

</div>

I’m new, I have a problem and want a solution Currently, I want to place cubes with different shapes on top of each other. The current logic is to drag object A along the Y axis and release it, object A will fall down a…

---

## [Detect collision of instanced mesh and planes](https://discourse.threejs.org/t/detect-collision-of-instanced-mesh-and-planes/66305)

<div class="topic-metadata">

**Author:** [@PhiNM6296](https://discourse.threejs.org/u/PhiNM6296)\
**Replies:** 2\
**Last updated:** [June 2, 2024, 7:49pm UTC](https://discourse.threejs.org/t/detect-collision-of-instanced-mesh-and-planes/66305 "2024-06-02T19:49:59Z")

</div>

Following up this topic of detecting rain drop collision with a Plane, i have this function bellow, using ray cast to find collision point and reset the rain drop (instanced mesh) whenever it get pass the collision point…

---

## [Detect that the user wants to move forward after a collision](https://discourse.threejs.org/t/detect-that-the-user-wants-to-move-forward-after-a-collision/65166)

<div class="topic-metadata">

**Author:** [@csbt](https://discourse.threejs.org/u/csbt)\
**Replies:** 3\
**Last updated:** [May 18, 2024, 5:23pm UTC](https://discourse.threejs.org/t/detect-that-the-user-wants-to-move-forward-after-a-collision/65166 "2024-05-18T17:23:48Z")

</div>

I am trying to use the mouse to move objects in the editor. When a collision occurs, if the user continues to move the mouse a certain distance X towards the collided object, the main object will jump on top of the colli…

---

## [Avoid collision with walls. first-person control](https://discourse.threejs.org/t/avoid-collision-with-walls-first-person-control/45161)

<div class="topic-metadata">

**Author:** [@Lily](https://discourse.threejs.org/u/Lily)\
**Replies:** 9\
**Last updated:** [April 23, 2024, 10:06am UTC](https://discourse.threejs.org/t/avoid-collision-with-walls-first-person-control/45161 "2024-04-23T10:06:59Z")

</div>

I’ve created navigation mesh on my Scene with walkable Property in Blender. The walkable area is floor without objects (You can see in the attached image).I could load it as glb data,save floor and wall as Obejct 3d, con…

---

## [Three-mesh-bvh stop drag after collision](https://discourse.threejs.org/t/three-mesh-bvh-stop-drag-after-collision/63262)

<div class="topic-metadata">

**Author:** [@hunghaui2310](https://discourse.threejs.org/u/hunghaui2310)\
**Replies:** 4\
**Last updated:** [March 28, 2024, 2:32am UTC](https://discourse.threejs.org/t/three-mesh-bvh-stop-drag-after-collision/63262 "2024-03-28T02:32:09Z")

</div>

I’m using three-mesh-bvh to check collision between 2 object in Threejs. The function intersectsGeometry working for collision. I edited the TransformControl.js to check collision when dragging, like: checkCollision(i…

---

## [Clipping/Compressing parts of FBX object outside of another FBX object](https://discourse.threejs.org/t/clipping-compressing-parts-of-fbx-object-outside-of-another-fbx-object/63036)

<div class="topic-metadata">

**Author:** [@picklesmoon](https://discourse.threejs.org/u/picklesmoon)\
**Replies:** 17\
**Last updated:** [March 27, 2024, 3:51pm UTC](https://discourse.threejs.org/t/clipping-compressing-parts-of-fbx-object-outside-of-another-fbx-object/63036 "2024-03-27T15:51:17Z")

</div>

I have a scene with a fish in a bowl. Both objects are two separate FBXs. bowl.fbx (121.3 KB) fish.fbx (1.8 MB) The fish is bigger than the bowl, and some parts are sticking out (colliding with the bowl), I need to re…

---

## [How to detect exactly collision of a Mesh has children](https://discourse.threejs.org/t/how-to-detect-exactly-collision-of-a-mesh-has-children/63057)

<div class="topic-metadata">

**Author:** [@hunghaui2310](https://discourse.threejs.org/u/hunghaui2310)\
**Replies:** 1\
**Last updated:** [March 21, 2024, 6:49am UTC](https://discourse.threejs.org/t/how-to-detect-exactly-collision-of-a-mesh-has-children/63057 "2024-03-21T06:49:50Z")

</div>

Now I’m checking the collision between Mesh. I use Vertex and Raycaster to detect the collision. const spheres = editor.scene.children; // list object from scene const box1 = spheres\[0\]; if (box1.children.length \> 0) {…

---

## [How to make player collides in this scene?](https://discourse.threejs.org/t/how-to-make-player-collides-in-this-scene/62930)

<div class="topic-metadata">

**Author:** [@Cristian\_Martinez](https://discourse.threejs.org/u/Cristian_Martinez)\
**Replies:** 9\
**Last updated:** [March 17, 2024, 11:42pm UTC](https://discourse.threejs.org/t/how-to-make-player-collides-in-this-scene/62930 "2024-03-17T23:42:33Z")

</div>

I have this proyect: index.html (3.3 KB) With this images in the same folder as the index.html file. But I want when the ‘Mario’ check the collision with any bricks around the scene, it repels, like Sup…

---

## [How to stop dragging of an object when collision detected?](https://discourse.threejs.org/t/how-to-stop-dragging-of-an-object-when-collision-detected/60765)

<div class="topic-metadata">

**Author:** [@RickyLo](https://discourse.threejs.org/u/RickyLo)\
**Replies:** 11\
**Last updated:** [January 29, 2024, 12:56pm UTC](https://discourse.threejs.org/t/how-to-stop-dragging-of-an-object-when-collision-detected/60765 "2024-01-29T12:56:50Z")

</div>

I’m trying for this to work but I cannot seem to find any solution. The closest solution I have found is disabling TransformControls when collision is detected but I’d like to move again if I need. Can someone help me? f…

---

## [How do I make the object to stop if collision detected?](https://discourse.threejs.org/t/how-do-i-make-the-object-to-stop-if-collision-detected/60727)

<div class="topic-metadata">

**Author:** [@RickyLo](https://discourse.threejs.org/u/RickyLo)\
**Replies:** 0\
**Last updated:** [January 25, 2024, 5:07pm UTC](https://discourse.threejs.org/t/how-do-i-make-the-object-to-stop-if-collision-detected/60727 "2024-01-25T17:07:12Z")

</div>

I do have the animation function here function animateTheeBox() { if (!isDragging && !orbitControls.enabled) { rayCasters.setFromCamera(mousePos, camera); const intersect = rayCasters.intersectObject…

---

## [Collision with walls/floors/objects \[furniture\] in room when using Transform Controls](https://discourse.threejs.org/t/collision-with-walls-floors-objects-furniture-in-room-when-using-transform-controls/60049)

<div class="topic-metadata">

**Author:** [@JxstWieslaw](https://discourse.threejs.org/u/JxstWieslaw)\
**Replies:** 4\
**Last updated:** [January 10, 2024, 8:27am UTC](https://discourse.threejs.org/t/collision-with-walls-floors-objects-furniture-in-room-when-using-transform-controls/60049 "2024-01-10T08:27:37Z")

</div>

Hie Devs😄, compliments of the new season. Need some help with something. Any ideas are welcome. I’m making an app where you can configure a room and move around objects using Transform Controls. Need to ensure that ob…

---

## [How to Collide two objects using TransformControls dragging and get dragging smoothly?](https://discourse.threejs.org/t/how-to-collide-two-objects-using-transformcontrols-dragging-and-get-dragging-smoothly/13205)

<div class="topic-metadata">

**Author:** [@mina\_magdy](https://discourse.threejs.org/u/mina_magdy)\
**Replies:** 13\
**Last updated:** [January 5, 2024, 11:10am UTC](https://discourse.threejs.org/t/how-to-collide-two-objects-using-transformcontrols-dragging-and-get-dragging-smoothly/13205 "2024-01-05T11:10:06Z")

</div>

I have some days trying to make a collision for 2 objects that can detect last position before the collision happened to can make the drag for each selected object smoothly dragging without stop each time getting collide…

---

## [Having problems with EPA Collision Resolution](https://discourse.threejs.org/t/having-problems-with-epa-collision-resolution/59224)

<div class="topic-metadata">

**Author:** [@RedJ1ve](https://discourse.threejs.org/u/RedJ1ve)\
**Replies:** 0\
**Last updated:** [December 14, 2023, 1:09pm UTC](https://discourse.threejs.org/t/having-problems-with-epa-collision-resolution/59224 "2023-12-14T13:09:55Z")

</div>

Hi All, I’ve been following a tutorial for GJK and EPA collisions here: https://winter.dev/articles/epa-algorithm. My GJK algorithm is working perfectly in testing, however my EPA algorithm is not working. The original …

---

## [Cant get vertices in three js anymore](https://discourse.threejs.org/t/cant-get-vertices-in-three-js-anymore/57520)

<div class="topic-metadata">

**Author:** [@victor\_Avelar](https://discourse.threejs.org/u/victor_Avelar)\
**Replies:** 2\
**Last updated:** [October 29, 2023, 3:14am UTC](https://discourse.threejs.org/t/cant-get-vertices-in-three-js-anymore/57520 "2023-10-29T03:14:13Z")

</div>

I have been trying to make a physics engine for long enough and still haven’t found a way to get the vertices to detect collisions because I need obj meshes to have their own collisions but I only found ways for cubes an…

---

## [Raycast collisions with xr controller not working](https://discourse.threejs.org/t/raycast-collisions-with-xr-controller-not-working/41586)

<div class="topic-metadata">

**Author:** [@thispatcher](https://discourse.threejs.org/u/thispatcher)\
**Replies:** 4\
**Last updated:** [September 20, 2023, 9:12am UTC](https://discourse.threejs.org/t/raycast-collisions-with-xr-controller-not-working/41586 "2023-09-20T09:12:11Z")

</div>

I’m able to get raycast collision detection working in my scene when using a mouse, as depicted in the first codeblock below. However, I haven’t been able to get a raycaster to intersect with objects in my scene while in…

---

## [Object positioning algorithm](https://discourse.threejs.org/t/object-positioning-algorithm/55654)

<div class="topic-metadata">

**Author:** [@wannnwdooo1984](https://discourse.threejs.org/u/wannnwdooo1984)\
**Replies:** 7\
**Last updated:** [September 7, 2023, 11:59am UTC](https://discourse.threejs.org/t/object-positioning-algorithm/55654 "2023-09-07T11:59:21Z")

</div>

Good afternoon. It is necessary to place the models when loading next to the already loaded models. The first model should be loaded in the center of the plane, and the rest should be located next to it. Also, they sho…

---

## [How can I random move inside a Polygon?](https://discourse.threejs.org/t/how-can-i-random-move-inside-a-polygon/39860)

<div class="topic-metadata">

**Author:** [@xjindf](https://discourse.threejs.org/u/xjindf)\
**Replies:** 7\
**Last updated:** [July 12, 2023, 5:21pm UTC](https://discourse.threejs.org/t/how-can-i-random-move-inside-a-polygon/39860 "2023-07-12T17:21:33Z")

</div>

Hi guys, can u give me a light about this concern? Let’s suppose that I have several character models, and I want each model to move randomly within the specified range without colliding with each other. Can you give me…

[Next page](https://discourse.threejs.org/tag/collision-detection/236.md?match_all_tags=true&page=1&tags%5B%5D=collision-detection)
