# Raycast not working

**URL:** <https://discourse.threejs.org/t/raycast-not-working/30047>\
**Category:** Questions\
**Tags:** raycaster\
**Created:** [September 18, 2021, 11:20pm UTC](https://discourse.threejs.org/t/raycast-not-working/30047 "2021-09-18T23:20:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mathman05](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mathman05/32/19338_2.png) [@mathman05](https://discourse.threejs.org/u/mathman05)\
**Post date:** [September 18, 2021, 11:20pm UTC](https://discourse.threejs.org/t/raycast-not-working/30047/1 "2021-09-18T23:20:07Z")

</div>

```javascript
const post=new THREE.Vector3(-Math.PI/2,0,0);
const post2=new THREE.Vector3(dolly.position.x,dolly.position.y,dolly.position.z);
post.normalize();
raycaster.set(post2,post)
const temp=raycaster.intersectObjects(scene.children)

```

temp never contains any objects even when dolly is directly above the objects.

---

<div class="post-metadata">

**Author:** ![looeee](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/looeee/32/59_2.png) [@looeee](https://discourse.threejs.org/u/looeee)\
**Post date:** [September 19, 2021, 2:11am UTC](https://discourse.threejs.org/t/raycast-not-working/30047/2 "2021-09-19T02:11:04Z")

</div>

Can you share your complete code? As a working example on codesandbox/codepen if possible.

---

<div class="post-metadata">

**Author:** ![mathman05](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mathman05/32/19338_2.png) [@mathman05](https://discourse.threejs.org/u/mathman05)\
**Post date:** [September 19, 2021, 2:22am UTC](https://discourse.threejs.org/t/raycast-not-working/30047/3 "2021-09-19T02:22:53Z")

</div>

[https://Vrtest.mathman05.repl.co](https://Vrtest.mathman05.repl.co) the edit button in the bottom right-hand corner should work.

---

<div class="post-metadata">

**Author:** ![looeee](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/looeee/32/59_2.png) [@looeee](https://discourse.threejs.org/u/looeee)\
**Post date:** [September 19, 2021, 9:23am UTC](https://discourse.threejs.org/t/raycast-not-working/30047/4 "2021-09-19T09:23:00Z")

</div>

> [@mathman05](#):
>
> the edit button in the bottom right-hand corner should work.

That takes me to the three.js editor. How do I see the actual code?

---

<div class="post-metadata">

**Author:** ![mathman05](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mathman05/32/19338_2.png) [@mathman05](https://discourse.threejs.org/u/mathman05)\
**Post date:** [September 19, 2021, 12:42pm UTC](https://discourse.threejs.org/t/raycast-not-working/30047/5 "2021-09-19T12:42:53Z")

</div>

the scene contains the code

---

<div class="post-metadata">

**Author:** ![mathman05](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mathman05/32/19338_2.png) [@mathman05](https://discourse.threejs.org/u/mathman05)\
**Post date:** [September 19, 2021, 11:57pm UTC](https://discourse.threejs.org/t/raycast-not-working/30047/6 "2021-09-19T23:57:42Z")

</div>

got it working it just didn’t like scene.children but it took the children of a group just fine
