# \#line-segments-and-raycaster

**URL:** https://discourse.threejs.org/tag/line-segments-and-raycaster/526.md

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

---

## [How to determine whether a line segment intersects a frustum?](https://discourse.threejs.org/t/how-to-determine-whether-a-line-segment-intersects-a-frustum/28505)

<div class="topic-metadata">

**Author:** [@Mehdi\_Esfahani](https://discourse.threejs.org/u/Mehdi_Esfahani)\
**Replies:** 5\
**Last updated:** [March 31, 2022, 1:43pm UTC](https://discourse.threejs.org/t/how-to-determine-whether-a-line-segment-intersects-a-frustum/28505 "2022-03-31T13:43:39Z")

</div>

I need to be able to determine whether the straight line between two points (segment), crosses the space inside a frustum (intersects the frustum). I’ve looked into the APIs offered by THREE.js and haven’t been able to f…

---

## [Ray.intersectsSphere giving incorrect intersection results](https://discourse.threejs.org/t/ray-intersectssphere-giving-incorrect-intersection-results/23661)

<div class="topic-metadata">

**Author:** [@delaneyj](https://discourse.threejs.org/u/delaneyj)\
**Replies:** 2\
**Last updated:** [February 22, 2021, 5:11pm UTC](https://discourse.threejs.org/t/ray-intersectssphere-giving-incorrect-intersection-results/23661 "2021-02-22T17:11:37Z")

</div>

I have a seen where I’m trying to show direct line of sight. Using ray.intersectsSphere(sphere) I’m getting definite intersections as show below. Screen Shot 2021-02-19 at 10.58.10 AM|639x500 However with a custom fu…

---

## [Prevent raycaster from casting through other objects](https://discourse.threejs.org/t/prevent-raycaster-from-casting-through-other-objects/15210)

<div class="topic-metadata">

**Author:** [@jedinger](https://discourse.threejs.org/u/jedinger)\
**Replies:** 2\
**Last updated:** [May 14, 2020, 2:18pm UTC](https://discourse.threejs.org/t/prevent-raycaster-from-casting-through-other-objects/15210 "2020-05-14T14:18:59Z")

</div>

Hi there! How can I prevent the raycaster from casting (on sphere) through other objects (cube) in the scene as you can see here. I set up a second ‘intersectObjects’ for everything that the raycaster should not cast t…
