# Locking mouse in center of screen

**URL:** <https://forums.unrealengine.com/t/locking-mouse-in-center-of-screen/1877606>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question, Blueprint\
**Created:** [May 28, 2024, 7:44pm UTC](https://forums.unrealengine.com/t/locking-mouse-in-center-of-screen/1877606 "2024-05-28T19:44:12Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [May 29, 2024, 5:31am UTC](https://forums.unrealengine.com/t/locking-mouse-in-center-of-screen/1877606/7 "2024-05-29T05:31:09Z")

</div>

Line trace returns a bunch of data, it will tell you when you’ve hit nothing - no blocking hit, or no component, or no actor. Here’s the entire setup which also accounts for proximity:

> [@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…

---

_[View the full topic](https://forums.unrealengine.com/t/locking-mouse-in-center-of-screen/1877606)._
