# this was nullptr when trying to get coordinates

**URL:** <https://forums.unrealengine.com/t/this-was-nullptr-when-trying-to-get-coordinates/2079838>\
**Category:** AI\
**Tags:** ai-navigation, Behavior-Tree, behavior-tree-task, unreal-engine, CPP, question\
**Created:** [October 22, 2024, 9:05am UTC](https://forums.unrealengine.com/t/this-was-nullptr-when-trying-to-get-coordinates/2079838 "2024-10-22T09:05:00Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![RecourseDesign](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/recoursedesign/32/1194503_2.png) [@RecourseDesign](https://forums.unrealengine.com/u/RecourseDesign)\
**Post date:** [October 22, 2024, 9:28am UTC](https://forums.unrealengine.com/t/this-was-nullptr-when-trying-to-get-coordinates/2079838/6 "2024-10-22T09:28:36Z")

</div>

Maybe try making the value larger, say 2000.0f.

If this still doesn’t return anything, it may help to visualize the trace with one of the two options mentioned in this post:

> [@Draw debug lines for line tracing](https://forums.unrealengine.com/t/draw-debug-lines-for-line-tracing/280307):
>
> Hi guys, I am using the GetWorld()-\>LineTraceSingle() function in CPP code to trace some things. It would be very handy for me to actually see some debug lines drawn by an engine, while a tracing happens. In Blueprints, it is easily done with DrawDebugTrace checkbox, which is present in all the tracing nodes. Is it possible to enable it in C++?

---

_[View the full topic](https://forums.unrealengine.com/t/this-was-nullptr-when-trying-to-get-coordinates/2079838)._
