# Twinstick crosshair in HUD?

**URL:** <https://forums.unrealengine.com/t/twinstick-crosshair-in-hud/460032>\
**Category:** Blueprint\
**Tags:** hud-class, unreal-engine, twin-stick, question, Blueprint\
**Created:** [December 30, 2019, 2:32pm UTC](https://forums.unrealengine.com/t/twinstick-crosshair-in-hud/460032 "2019-12-30T14:32:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AX73894A](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AX73894A](https://forums.unrealengine.com/u/AX73894A)\
**Post date:** [December 30, 2019, 2:32pm UTC](https://forums.unrealengine.com/t/twinstick-crosshair-in-hud/460032/1 "2019-12-30T14:32:37Z")

</div>

Hey folks,

I’m working on a top down/twin stick shooter where the crosshair is offset from the player by 300-400 units and rotates with the player (behavior traditionally seen for this genre basically).

Right now I have the crosshair as a sprite, child of the player pawn capsule, only visible to the owner. This all works great except when the player gets close to an object and is facing it (e.g. a wall). Then the crosshair clips into the object/disappears.

I was thinking of putting the crosshair in the HUD, but not sure how to approach rotating HUD elements dynamically. In my case the player is always center of the screen so at least the crosshair would only need to rotate around a fixed point in the middle of the screen.

Any thoughts?

---

<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:** [December 30, 2019, 10:14pm UTC](https://forums.unrealengine.com/t/twinstick-crosshair-in-hud/460032/2 "2019-12-30T22:14:53Z")

</div>

> I was thinking of putting the  
> crosshair in the HUD, but not sure how  
> to approach rotating HUD elements  
> dynamically.

This should work:

 ![294605-annotation-2019-12-30-221308.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/4/4a4e45e2499ae3484402e777ac85f80448a65631.png)

The wCross is the widget reference, the 300 multiplier is the crosshair distance from the player. We’re placing the widget _ahead_ of the player, 300uus along the forward vector. The white square is the widget:

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/5/1/351455d6ec3a33fe956702cc973e33d5dd9bf675.gif)](https://gyazo.com/f5aa3eb14cc3ccce062f97e919122ea4)

* * *

> In my case the player is always center  
> of the screen so at least the  
> crosshair would only need to rotate  
> around a fixed point in the middle of  
> the screen.

The above uses player location so it will work in any scenario.
