I’d like to align a 2d widget to an actor. To do this, I added the widget to a canvas and I’m setting it’s canvas panel slot’s position in the tick function. This works very well to a certain point.
As you can see in the attached image, if the actor is too close to the edge of the screen, the widget gets clipped and a part of it moves out of the screen. I want the widget to stay on screen without being clipped and constrain it to the player’s screen. Is there a simple way to achieve this behaviour?