UMG location to widget position not projecting

Not sure about that Project node. You could try this one instead Project World to Screen.

And your location variable is named “MuzzleDirection” so I want to be clear that you don’t want to give it a direction vector, you want to give it the world location of the termination point of the trace.

Oh, the one you’re using handles scaling. Seems like it should work. I guess make sure the input location is good.

Hey i’m trying to get a hit from a trace to determine where the crosshair will be for my musket.

Really just want gun that has its crosshair move based on where the muzzle is pointing.

didn’t work :confused: and ya it contains the location of where the trace hit

the node just wont turn the location variable into screen data for my set position function to use.

looks like it right?

I see it’s online multiplayer. Are you sure you’re calling this on the owning client?

Oh it’s in the widget, duh. Yeah that’s client only.

You can get the controller directly from the pawn. Why use the player ID?

And is the PrintString saying the return value is true?

Drag off the CastTo output pin and add the GetController node and feed it into the project node.

If it still says false then that means the world location isn’t visible given the camera’s location and rotation (aspect ratio and FOV too I guess).

Cast the GetController output to PlayerController first. Forgot that part.

Drag off the output pin of GetController and type “cast to player controller” and it should come up before you’re done typing.

That’s not what I suggested – I didn’t know about that node – but I’ll take the credit. :slight_smile:

Nope it says false.

actually when i go and do this

229823-capture.png

it says that 1 player is true but i cant see the widget

Can’t plug in player controller. Not compatible with player controller ref.

how do i cast it into player controller?

FIXED!!! thank you so much for helping me through this.

Just to be clear, this is what I was suggesting – but getting the controller directly like you are is better.