Why is user widget not at origin and pointing away from user?

I created a simple widget with white background and black text on it:


I did not change any transform settings from the default.

Next, I created an actor blueprint and added the widget to it in a Widget Component:


Again, I left the transform settings as default:

Now, when I add the actor to the default VR Level at position (0,0,0) without any rotation, it has these problems:

  1. It is facing away from the player
  2. It is not located at (0,0,0)

Any ideas why this is happening?
It is making it hard to place the widgets in my game.

This is the origin

image

The widget if facing X, and when you drop an actor is the world, by default its X will align with world X.

The player start is the same

1 Like

Thank you for that explanation, that explains why it is facing away from the player.
What about the panel not being located at the origin of the actor?

You need to center the text in your widget BP, and anchor it to the center of the screen :slight_smile:

Check the coordinates of the widget component. It might have a local offset in place. Try zeroing out it’s location and see if it aligns with the parent position.

I think the text is already centered in the widget. It is displaying in the center of the white area. Maybe I am misunderstanding what you are saying.

If you look at the 2nd pic I posted, the widget component has location (0,0,0)

I was referring to the widget component, not the parent actor.

Also you can try setting your widget element alignment to 0,5 x 0,5 and anchor to center. This will make the element center.

And set size of the canvas to custom so it doesn’t have the screen size / dimensions.

1 Like

I am sorry I misunderstood. I think this is the setting you asked me to check and it is (0,0,0)

Yes, that was it!

It’s not in the middle

It also needs an anchor.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.