# Is there any way to access unreal.HitResult properties in python?

**URL:** <https://forums.unrealengine.com/t/is-there-any-way-to-access-unreal-hitresult-properties-in-python/1664661>\
**Category:** Editor Scripting\
**Tags:** Python, unreal-engine, question\
**Created:** [February 4, 2024, 6:07am UTC](https://forums.unrealengine.com/t/is-there-any-way-to-access-unreal-hitresult-properties-in-python/1664661 "2024-02-04T06:07:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AchAch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AchAch](https://forums.unrealengine.com/u/AchAch)\
**Post date:** [February 4, 2024, 6:07am UTC](https://forums.unrealengine.com/t/is-there-any-way-to-access-unreal-hitresult-properties-in-python/1664661/1 "2024-02-04T06:07:11Z")

</div>

Hello! I have created a line trace in a python script, and it appears to work, except that I can’t access any information about the HitResult. If the HitResult if saved in a variable called `myhit`, attempting to read `myhit.get_editor_property("location")` throws this error: `Error: Exception: HitResult: Property 'Location' for attribute 'location' on 'HitResult' is protected and cannot be read`

Does anyone know of another way of going about accessing a HitResult, or is this simply not supported by the Python API at the moment?

---

<div class="post-metadata">

**Author:** ![Aspartemeart](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aspartemeart](https://forums.unrealengine.com/u/Aspartemeart)\
**Post date:** [May 2, 2024, 5:20am UTC](https://forums.unrealengine.com/t/is-there-any-way-to-access-unreal-hitresult-properties-in-python/1664661/2 "2024-05-02T05:20:16Z")

</div>

Hi AchAch. I had the same problem. I found python HitResult(StructBase) have a function “to\_tuple()”. so I converted HitResult to tuple, accessing it with index number. It works. Hope you can solve your problem. 🙂
