# Trying to toggle visibility off when raycast is no longer hitting the object

**URL:** <https://forums.unrealengine.com/t/trying-to-toggle-visibility-off-when-raycast-is-no-longer-hitting-the-object/429728>\
**Category:** Blueprint\
**Tags:** raycasting, unreal-engine, question, Blueprint\
**Created:** [July 19, 2018, 2:06am UTC](https://forums.unrealengine.com/t/trying-to-toggle-visibility-off-when-raycast-is-no-longer-hitting-the-object/429728 "2018-07-19T02:06:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Legionx21](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Legionx21](https://forums.unrealengine.com/u/Legionx21)\
**Post date:** [July 19, 2018, 2:06am UTC](https://forums.unrealengine.com/t/trying-to-toggle-visibility-off-when-raycast-is-no-longer-hitting-the-object/429728/1 "2018-07-19T02:06:58Z")

</div>

This is probably a super easy fix but I’m a noob and can’t for the life of me how to get the the text to toggle off when looking away. Please help!

---

<div class="post-metadata">

**Author:** ![mightyenigma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mightyenigma](https://forums.unrealengine.com/u/mightyenigma)\
**Post date:** [July 19, 2018, 2:49am UTC](https://forums.unrealengine.com/t/trying-to-toggle-visibility-off-when-raycast-is-no-longer-hitting-the-object/429728/2 "2018-07-19T02:49:03Z")

</div>

Your branch is set to always be true. Get some sleep 🙂

---

<div class="post-metadata">

**Author:** ![Legionx21](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Legionx21](https://forums.unrealengine.com/u/Legionx21)\
**Post date:** [July 19, 2018, 3:10am UTC](https://forums.unrealengine.com/t/trying-to-toggle-visibility-off-when-raycast-is-no-longer-hitting-the-object/429728/3 "2018-07-19T03:10:57Z")

</div>

Forgive my ignorance, but you’re talking about for the line trace correct? I tried creating another function in my player interface and wasn’t really sure how to connect it or if I was even on the right track.

---

<div class="post-metadata">

**Author:** ![Legionx21](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Legionx21](https://forums.unrealengine.com/u/Legionx21)\
**Post date:** [July 19, 2018, 3:11am UTC](https://forums.unrealengine.com/t/trying-to-toggle-visibility-off-when-raycast-is-no-longer-hitting-the-object/429728/4 "2018-07-19T03:11:59Z")

</div>

This is what I’m talking about

---

<div class="post-metadata">

**Author:** ![mightyenigma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mightyenigma](https://forums.unrealengine.com/u/mightyenigma)\
**Post date:** [July 19, 2018, 6:47am UTC](https://forums.unrealengine.com/t/trying-to-toggle-visibility-off-when-raycast-is-no-longer-hitting-the-object/429728/5 "2018-07-19T06:47:56Z")

</div>

I mean the branch in screenshot-1.png
