Twinstick crosshair in HUD?

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?

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

This should work:

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


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.