Announcement

Collapse
No announcement yet.

Trouble offseting crosshair widget properly.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Trouble offseting crosshair widget properly.

    I have a UMG widget composed of 5 different borders that serve as crosshairs for my game. Four of the borders are offset on the X or Y axis +/- 26 pixels at minimum up to +/- 128 for spread. The issue is that two of the borders are further away from the center than the other two. In the Widget Designer all of the borders are set to 0, 0 and are identical with the exception of their names. I've checked the position of them and when the player is stationary the correlative borders are both 26px from the midpoint, they're being offset the correct number of pixels, so I can't understand what the problem is.
    Click image for larger version

Name:	crosshairs.PNG
Views:	1
Size:	85.6 KB
ID:	1146145
    Click image for larger version

Name:	BP1.PNG
Views:	1
Size:	396.1 KB
ID:	1146146
    Click image for larger version

Name:	BP3.PNG
Views:	1
Size:	370.8 KB
ID:	1146147
    Click image for larger version

Name:	BP2.PNG
Views:	1
Size:	413.7 KB
ID:	1146148

    Thanks for any help.

    #2
    Ok just to clarify I did not look at the blueprint. It's really hard to follow like that with all those floats hanging around coming from somewhere and going somewhere else...

    But I am fairly sure I know what's causing the issue. You are setting the location however the pictures are not placed in the middle. They take a corner and use that as reference point (by default). Now two of your borders have that point at the nearer end to the middle and two on the one further away.
    There should be an option in the details to center your border which should take care of this issue.

    Cheers

    Comment


      #3
      Do you mean the anchors? I have them all set to the middle, and when I mouse over the border border they're all exactly 50.0% from each side. The alignment is the same for all of them too, I can't find any setting that's different or would cause them to be shifted slightly.
      Click image for larger version

Name:	details.PNG
Views:	1
Size:	212.6 KB
ID:	1070444

      Comment


        #4
        Sorry for the super late answer.

        Could you show me the rest of the buttons (exactly the same part of the details)?
        Because it's pretty hard to randomly guess your settings.

        Comment

        Working...
        X