how to get the world position of the screen corner?

my game is fullscreen in mobile. How can I get the world position in 3D of the scrren corner in gold view? because I want to get the visible area in the plane(0, 0, 1).

  • // viewport size
  • const FVector2D viewportSize = FVector2D(GEngine->GameViewport->Viewport->GetSizeXY());
  • FVector2D vecLeftUp;
  • vecLeftUp.X = 0.0f;
  • vecLeftUp.Y = 0.0f;
  • UGameplayStatics:: DeprojectScreenToWorld(PlayerCtl, screenPt, worldOrigin, worldDirection);
  • then projection to my plane
  • FVector PlaneOrigin = FVector(0.0f, 0.0f, 0.0f);
  • FVector PlaneNormal = FVector(0.0f, 0.0f, 1.0f);

how can I transform the position from viewport to the screen position, maybe other way to corrent the offset?
please help, thanks.