# Can't recall function several times

**URL:** <https://forums.unrealengine.com/t/cant-recall-function-several-times/473836>\
**Category:** Rendering\
**Tags:** line-trace, Reflections, calling-a-function, unreal-engine, functions, Blueprint, question\
**Created:** [November 1, 2020, 2:43pm UTC](https://forums.unrealengine.com/t/cant-recall-function-several-times/473836 "2020-11-01T14:43:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![meowololo\_1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/meowololo_1/32/603997_2.png) [@meowololo\_1](https://forums.unrealengine.com/u/meowololo_1)\
**Post date:** [November 1, 2020, 2:43pm UTC](https://forums.unrealengine.com/t/cant-recall-function-several-times/473836/1 "2020-11-01T14:43:31Z")

</div>

Hello!

I make a reflection of LineTrace. My problem is when the ray hits the first block, it bounces off it, after the function calls LineTrace function again, **but** the second and subsequent times it doesn’t work.

After the first reflection it seems to lose the next hit

What could be the problem?

 ![320783-scene.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/e/9/5e99d96e6846345fd0d94ef4a4b912d6c556166a.jpeg)

 ![320784-eventgraph.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/c/a/fca1298b7c1226b6057d0083d1157dcd4827f208.jpeg)

 ![320785-casttrace.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/7/0/c70007271869045249dbdee47d93187977b6b190.jpeg)

 ![320786-reflection.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/e/6/7e6454024db1d8277cee2189283065be022646b2.jpeg)

---

<div class="post-metadata">

**Author:** ![chrudimer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chrudimer/32/918651_2.png) [@chrudimer](https://forums.unrealengine.com/u/chrudimer)\
**Post date:** [November 1, 2020, 3:09pm UTC](https://forums.unrealengine.com/t/cant-recall-function-several-times/473836/2 "2020-11-01T15:09:10Z")

</div>

Hi, maybe I missed something, but from the logic you have shown (I assume it starts in the first image), it will call “Cast Trace”, first trace, then it will call “Reflections”, which will again call “Cast Trace”, second trace, then you don’t do anything anymore, so two traces in total. You would need to let Reflection call itself as long as it hits a mirror.

If I did miss something in your logic and what I wrote above is not the reason for two traces only, then I would do prints and see where it does something you don’t expect / see where it fails.

---

<div class="post-metadata">

**Author:** ![meowololo\_1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/meowololo_1/32/603997_2.png) [@meowololo\_1](https://forums.unrealengine.com/u/meowololo_1)\
**Post date:** [November 1, 2020, 3:22pm UTC](https://forums.unrealengine.com/t/cant-recall-function-several-times/473836/3 "2020-11-01T15:22:33Z")

</div>

In my head i see, that it calls Cast Trace → Reflection → Cast Trace and because next hitted Actor has Tag “mirror” it going to Reflection → Cast Trace and so on

Maybe I missing something

---

<div class="post-metadata">

**Author:** ![meowololo\_1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/meowololo_1/32/603997_2.png) [@meowololo\_1](https://forums.unrealengine.com/u/meowololo_1)\
**Post date:** [November 1, 2020, 3:33pm UTC](https://forums.unrealengine.com/t/cant-recall-function-several-times/473836/4 "2020-11-01T15:33:57Z")

</div>

I did it. It works. Thank you - write your solution in Answer so I can mark it like an answer
