# Help with goal tracking

**URL:** <https://forums.unrealengine.com/t/help-with-goal-tracking/1908558>\
**Category:** Blueprint\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [June 19, 2024, 4:17am UTC](https://forums.unrealengine.com/t/help-with-goal-tracking/1908558 "2024-06-19T04:17:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![HawksHalo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hawkshalo/32/949854_2.png) [@HawksHalo](https://forums.unrealengine.com/u/HawksHalo)\
**Post date:** [June 19, 2024, 4:17am UTC](https://forums.unrealengine.com/t/help-with-goal-tracking/1908558/1 "2024-06-19T04:17:58Z")

</div>

Currently using a widget to display how far away from the goal the player is. I’ve put the widget into the blueprint itself so it displays above the goal since that’s what I was told to do, and got tracking working, but the issue is it doesn’t change the distance to match the object itself.

I’ve got it showing up one at a time as each stage starts, but not matching the location. it always points towards the very first goal instead of the one I want?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/9/b/b9b2c2680bb55355bb2323f9233860c613a28ed9.png)

---

<div class="post-metadata">

**Author:** ![PREDALIEN](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/predalien/32/1194670_2.png) [@PREDALIEN](https://forums.unrealengine.com/u/PREDALIEN)\
**Post date:** [June 19, 2024, 7:39am UTC](https://forums.unrealengine.com/t/help-with-goal-tracking/1908558/2 "2024-06-19T07:39:48Z")

</div>

How does the distance from the blueprint get into the widget?  
You need to call the text update function on the widget after calculating the distance.

 ![Distance](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/3/6/436b3b11b61265b1f21b8d459469a69837068e44.png)

---

<div class="post-metadata">

**Author:** ![HawksHalo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hawkshalo/32/949854_2.png) [@HawksHalo](https://forums.unrealengine.com/u/HawksHalo)\
**Post date:** [June 19, 2024, 8:45am UTC](https://forums.unrealengine.com/t/help-with-goal-tracking/1908558/3 "2024-06-19T08:45:40Z")

</div>

Currently this is how it gets in

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/6/b/46b8ae4676777902757782afbd61d612bd30f5c8.png)

Ill try giving what you did a go if I can work it out

---

<div class="post-metadata">

**Author:** ![HawksHalo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/hawkshalo/32/949854_2.png) [@HawksHalo](https://forums.unrealengine.com/u/HawksHalo)\
**Post date:** [June 19, 2024, 8:56am UTC](https://forums.unrealengine.com/t/help-with-goal-tracking/1908558/4 "2024-06-19T08:56:28Z")

</div>

How do I make the update distance function? I tried doing it through a binding but I just keep getting this

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/5/d/85d2031b1d2d239c4937d0c6738300a2950a89a7.png)

---

<div class="post-metadata">

**Author:** ![PREDALIEN](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/predalien/32/1194670_2.png) [@PREDALIEN](https://forums.unrealengine.com/u/PREDALIEN)\
**Post date:** [June 19, 2024, 10:41am UTC](https://forums.unrealengine.com/t/help-with-goal-tracking/1908558/5 "2024-06-19T10:41:48Z")

</div>

Add a function to the widget via the MyBlueprint panel.

![CreateFunc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/3/d/13d8f410cf7e9108894eec5c83f9563fb3466424.png)

Also remove the bind from the TextBlock.

![RemoveBind](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/7/6/87693e6c00743ea5209ad721db2999437b1283e7.png)

Avoid using bind in widgets as these functions are called on every tick which can cause performance issues.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [July 19, 2024, 10:41am UTC](https://forums.unrealengine.com/t/help-with-goal-tracking/1908558/6 "2024-07-19T10:41:57Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
