Hi
I’m trying to create a bombard screen for select Bombard Location to do this I create a cursor widget and add in to another widget, like fig 1 and fig 2 I get cursor widget position and send it to my weapon Blueprint, after that like fig 3 I use this position and line trace from cursor to location but the line has large deviation from the Cursor Point (The way in fig 3 work well in select location by touch ) any body know why this happend ?
fig 1 :
fig 2 :
fig 3 :
fig 4 :
I don’t know what will fix it. Maybe try changing your CalculatTargetLocation function so the World Direction is not used, you simply add 0,0,-100000 to the Location for the trace end. Does that help?
no the trace end Directly under the camera point at center of screen.
I notice that is a Position Problem because when I set Remove DPIScale true in Set Position in Viewport (fig 5) the Cursor don’t work true but the trace end is true (fig 6)any body know how can fix this ?
fig 5 :
fig 6 :
If that’s how it works then maybe you can set a variable to remember the cursor position before removing DPI scale, and use that for your trace instead.
I set the cursor position in **Cursor position variable ** before use set position in view port function ( fig 5) but the problem is when I wand trace, it tracing to position that equal to remove DPI scale from cursor position. The problem has two state in first state if I don,t remove DPI Scale the result is fig 4 and in second state if I Remove DPI Scale the tracing is work well but the cursor go far from the position that I release it fig 6 …
So that is why i was thinking of using two different variables so you can remove dpi scaling for one but not the other
I don’t Understand what you mean could you please explain more? there in no node for add or remove dpi scale and the remove dpi scale is only a bool choice in set position in view port node.
finally found it the problem is the way i get the bombard cursor position ,the true way is like fig 7 :