Getting viewport screen co-ordinates

Hello,

I’ve been chasing my tail for ages with this one. I’ve created some world coordinates and drawing a line-trace to them from the active player shows them to be exactly where I expect them to be. The viewport is 920 px x 513 px. Using the Project World to Screen node gives non-sensical values. I’ve tried with and without the Player Viewpoint Relative set and tried scaling it with the Viewport Scale node.

I’m having to run this ‘Play In Editor’ at the moment because playing ‘New Editor Window’ and ‘Standalone Game’ don’t seem to let me get the screenshots I need.

Am I missing something obvious? Project World to Screen seems like it should be straightforward. Any suggestions welcome.

Thanks in advance,

Hugh

If you are using it for a UI marker, you might need to project world to widget position instead. UMG HUD and monitor pixels are not the same.

UWidgetLayoutLibrary::ProjectWorldLocationToWidgetPosition | Unreal Engine 5.6 Documentation | Epic Developer Community

I’m working in Blueprints (and without widgets) so I’m afraid that is a bit beyond me.

The weird thing is that the y co-ordinates are spot on. I’m beginning to wonder whether it is because I am using a cinematic camera. It’s driving me mad.