# Event tick hooked to a line trace and only one "cast to actor" node make my fps fall slowly to unplayable. Is there any alternative to fix this ?

**URL:** <https://forums.unrealengine.com/t/event-tick-hooked-to-a-line-trace-and-only-one-cast-to-actor-node-make-my-fps-fall-slowly-to-unplayable-is-there-any-alternative-to-fix-this/1735725>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [March 7, 2024, 12:07pm UTC](https://forums.unrealengine.com/t/event-tick-hooked-to-a-line-trace-and-only-one-cast-to-actor-node-make-my-fps-fall-slowly-to-unplayable-is-there-any-alternative-to-fix-this/1735725 "2024-03-07T12:07:36Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 7, 2024, 1:44pm UTC](https://forums.unrealengine.com/t/event-tick-hooked-to-a-line-trace-and-only-one-cast-to-actor-node-make-my-fps-fall-slowly-to-unplayable-is-there-any-alternative-to-fix-this/1735725/12 "2024-03-07T13:44:44Z")

</div>

> [@catz111](#):
>
> Normal widget wouldn’t work for this

This part does not matter, it can be made with anything. Here’s an example and a project with this (slightly more advanced) behaviour:

> [@Third person crosshair object highlight troubles](https://forums.unrealengine.com/t/third-person-crosshair-object-highlight-troubles/252041/13):
>
> The communication in the example revolves around Inheritance + Interface - a potent combo, imho. the base class implements the interface (which children inherit) the widget uses the same interface - calls children receive can be propagated: Actor → Widget Component → Widget without casting or finding user widgets (this can be done in many ways, though) the player has a collision sphere and sends an interface call to overlapped actors as we approach: [image] [image] Above, handl…

An Interface may be preferable if you want to interact with unrelated classes.

---

_[View the full topic](https://forums.unrealengine.com/t/event-tick-hooked-to-a-line-trace-and-only-one-cast-to-actor-node-make-my-fps-fall-slowly-to-unplayable-is-there-any-alternative-to-fix-this/1735725)._
