Why my umg sprites are wrongly cut?

I have a umg hud setup for my minimap.

59988-8ecbc216186606f130350bf9dc2ee8dc.png

Map is rendered to Image Mini Map, some sprites above it and Canvas Npc for Npc tokens and their visiblilit triangles. I am placing them dynamically at runtime from C++ code.

And here is the image i got in game

59989-f85b59d5eb71deed900747ac25432cdc.png

You can see I have two visibility sector sprites cut from the wrong side. Looks like they are cut before they are rotates. Is there option how I can fix this behaviour?

My code for visiblility sprites creation.

UTexture2D *FovTexture = Npc->NpcAIComponent->LookHalfSector > 50 ? NpcFov120Material : NpcFov60Material;
VisibilityImage = NewObject<UImage>();
VisibilityImage->Brush.SetResourceObject(FovTexture);

NpcPanel->AddChild(VisibilityImage);
NpcCanvasSlot = Cast<UCanvasPanelSlot>(VisibilityImage->Slot);
NpcCanvasSlot->SetSize(FVector2D(FovTexture->GetSizeX(), FovTexture->GetSizeY()));
NpcCanvasSlot->SetAlignment(FVector2D(0.5f, 1.0f));
NpcCanvasSlot->SetAnchors(FAnchors(0.5f, 0.5f));
VisibilityImage->SetRenderTransformPivot(FVector2D(0.5f, 1.0f));

And code for their position setup and rotation.

if (VisibilityImage != nullptr) {
	VisibilityImage->SetVisibility(ESlateVisibility::Visible);
	NpcCanvasSlot = Cast<UCanvasPanelSlot>(VisibilityImage->Slot);
	NpcCanvasSlot->SetPosition(NpcPanelCanvasSize * MinimapDirection);
	VisibilityImage->SetRenderAngle((1 - Angle) * 360.f + Npc->GetActorRotation().Yaw + 90);
	VisibilityImage->Brush.TintColor = FSlateColor(FLinearColor(1, 1, 1, 1 - MinimapDistanceSq));
}

Don’t think there are errors there, but just for the info. they are positioned and rotated correctly I think.
It is some bug in sprites cutting logic in umg?

They are also wrongly cut in UMG editor preview.

60001-47074a18fb392c16ae611c84f71677de.png

Any ideas how I can overcome this? Or place where I should dig in UE source code?

I’m experiencing similar issue:

90305-capture.png

This my arrow indicator pointing to enemy airship that’s outside player’s FOV(you see things like this in most flying games)

From what I understand: Unreal first cuts out image that is outside screen and then rotates it. You can see it perfectly on your last image. I think switching order of this two procedures could fix our problem. @Epic please!

Have You found any workaround for that?

No, I don’t remember, I am not working on that project now. But I think we haven’t fixed that.

The render transform takes whatever is visible and moves it around. So if you have something cut off due to the positioning it’ll look like that no matter where you transform it to.

Try changing the actual location of the object and not it’s render transform.

Another way would be to spawn it in a place where it’s fully visible and then move it to the desired location on the HUD using the render transforms.