# Scene.PickWithRay VS Physics.Raycast

**URL:** <https://forum.babylonjs.com/t/scene-pickwithray-vs-physics-raycast/23183>\
**Category:** Questions\
**Created:** [August 18, 2021, 9:05pm UTC](https://forum.babylonjs.com/t/scene-pickwithray-vs-physics-raycast/23183 "2021-08-18T21:05:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MackeyK24](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mackeyk24/32/3741_2.png) [@MackeyK24](https://forum.babylonjs.com/u/MackeyK24)\
**Post date:** [August 18, 2021, 9:05pm UTC](https://forum.babylonjs.com/t/scene-pickwithray-vs-physics-raycast/23183/1 "2021-08-18T21:05:59Z")

</div>

Yo @Deltakosh , @sebavan , @Cedric … I got a question about pick with ray vs an actual physics raycast… Well basically is there a performance issue with one vs the other ?

Should i use physics over scene pick with ray ?

I am basically making a player controller that support both mesh.moveWithCollision as well as Ammo.btKenematicCharacterController movement. Right now i use scene.pickWithRay downwards to detect grounding… I use that for both setups. Should i be using Ammo physics raycast when using the character controller, is that physics raycast more performant in the long run ?

---

<div class="post-metadata">

**Author:** ![Raggar](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raggar/32/20672_2.png) [@Raggar](https://forum.babylonjs.com/u/Raggar)\
**Post date:** [August 18, 2021, 10:22pm UTC](https://forum.babylonjs.com/t/scene-pickwithray-vs-physics-raycast/23183/2 "2021-08-18T22:22:32Z")

</div>

Unless you use Babylon’s Octree or roll your own spatial partitioning, Ammo will be faster, as identifies possible intersections by first traversing the broadphase, followed by the more expensive ray/face test.

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [August 19, 2021, 7:46pm UTC](https://forum.babylonjs.com/t/scene-pickwithray-vs-physics-raycast/23183/3 "2021-08-19T19:46:37Z")

</div>

@sebavan and @Cedric are both out on vacation right now. Maybe @RaananW can confirm.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [August 20, 2021, 9:00am UTC](https://forum.babylonjs.com/t/scene-pickwithray-vs-physics-raycast/23183/4 "2021-08-20T09:00:34Z")

</div>

There is no real need to turn on both collision-system and a physics engine.  
Ammo will probably be faster, as @Ragger said. It very much depends on your scene setup, but if you already require a physics engine, use it 🙂
