do a linetrace from the camera to the hitlocation under mouse. depending on the length of the linestrace, scale the 2d cursor which is always facing the camera.
@Vollgaser suggested you scaled the cursor by distance. Here you’re scaling some actor by world location - making something orders of magnitude larger than it should be.
An alternative approach:
a widget component attached to the camera pawn and using absolute location & rotation
draw it in world space - automatic scaling
the widget’s material ignores depth - no need to worry about occlusion
trace on tick setting location & rotation of the component to face the camera
if there’s no geometry to trace against (you run out of table) you can Line Plane Intersect to simulate it; or surround the room with invisible collision boxes