# VR - Sphere trace disrupts the camera, and doesnt work

**URL:** <https://forums.unrealengine.com/t/vr-sphere-trace-disrupts-the-camera-and-doesnt-work/1770548>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [March 24, 2024, 9:56pm UTC](https://forums.unrealengine.com/t/vr-sphere-trace-disrupts-the-camera-and-doesnt-work/1770548 "2024-03-24T21:56:02Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![tekmoh777](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tekmoh777/32/914741_2.png) [@tekmoh777](https://forums.unrealengine.com/u/tekmoh777)\
**Post date:** [March 25, 2024, 8:16am UTC](https://forums.unrealengine.com/t/vr-sphere-trace-disrupts-the-camera-and-doesnt-work/1770548/3 "2024-03-25T08:16:31Z")

</div>

Hello SupportiveEntity, thanks for replying.

> Does it still crash if the debug visuals aren’t enabled?

You found it right !  
When I disable debug drawing in the node “Sphere trace…”, it doesnt crash or mess camera anymore 👍

However, I have never set up personnally “custom depth stencils” in my project.  
It seems like VR template has set up something about “custom depth stencils” that we are not aware of. In fact, I have tried every template, and only VR Template reproduces the problem.  
And I have found this post too here, same problem and using VR template “[MetaHuman with VR settings crashes edtior with DepthStencilRenderTarget.DepthStencilTarget-\>GetNumSamples() == NumSamples](https://forums.unrealengine.com/t/metahuman-with-vr-settings-crashes-edtior-with-depthstencilrendertarget-depthstenciltarget-getnumsamples-numsamples/720839)”.

I dont know yet what is custom depth stencils, but i need to understand how and why its configured in VR Template, and if i need it in my project, because Debug Drawing for Sphere Trace functions seems really useful .

What do you think about that?

---

_[View the full topic](https://forums.unrealengine.com/t/vr-sphere-trace-disrupts-the-camera-and-doesnt-work/1770548)._
