# How to make a function output node return a Desired Object Refrence Type from trace hit result?

**URL:** <https://forums.unrealengine.com/t/how-to-make-a-function-output-node-return-a-desired-object-refrence-type-from-trace-hit-result/447218>\
**Category:** Blueprint\
**Tags:** linetrace, hit-result, actor-blueprint, unreal-engine, question, Blueprint, function-signature\
**Created:** [April 14, 2019, 3:06pm UTC](https://forums.unrealengine.com/t/how-to-make-a-function-output-node-return-a-desired-object-refrence-type-from-trace-hit-result/447218 "2019-04-14T15:06:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alunnite](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alunnite](https://forums.unrealengine.com/u/Alunnite)\
**Post date:** [April 14, 2019, 3:06pm UTC](https://forums.unrealengine.com/t/how-to-make-a-function-output-node-return-a-desired-object-refrence-type-from-trace-hit-result/447218/1 "2019-04-14T15:06:42Z")

</div>

I want a function’s output to be of a specific object reference type (ORT). I’m struggling to figure out how to do this in blueprints, as line trace (out hit hit actor) returns a generalized Actor ORT. I can check that the actor hit is of a specific type, which is okay for some defensive programming and was the solution for [a similar question asked here][1]. I have a bunch of other functions that all have the input the Desired ORT.

Basically, I’m looking for a way to make sure that hit actor is the Desired ORT and then have a output node be of that desired object reference. Any ideas on how to do this?

 ![274145-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/7/d/a7d5f125dd9c476790afd03bb9ea5b92c7e32d95.png)

---

<div class="post-metadata">

**Author:** ![lkav](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/lkav/32/983349_2.png) [@lkav](https://forums.unrealengine.com/u/lkav)\
**Post date:** [April 14, 2019, 3:12pm UTC](https://forums.unrealengine.com/t/how-to-make-a-function-output-node-return-a-desired-object-refrence-type-from-trace-hit-result/447218/2 "2019-04-14T15:12:10Z")

</div>

Hi you need to cast first to the actor in your case “BP Platform Base”

---

<div class="post-metadata">

**Author:** ![Alunnite](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alunnite](https://forums.unrealengine.com/u/Alunnite)\
**Post date:** [April 14, 2019, 3:22pm UTC](https://forums.unrealengine.com/t/how-to-make-a-function-output-node-return-a-desired-object-refrence-type-from-trace-hit-result/447218/3 "2019-04-14T15:22:46Z")

</div>

Well that was stupidly simple. Thanks
