I found that this called from an Widget Utility moves the camera and kind of makes it almost orthographic, though not totally because its still perspective.
This still distorts things that are a bit far away, so its making the development of my 2D isometric game harder.
Is there anything i can do to make the camera in the editor 100% orthographic?
void UGlobalLibraries::MoveCamera(FVector newLocation, FRotator newRotation, float newFoV, ELevelViewportType ViewPortType) {
FEditorViewportClient* client = (FEditorViewportClient*)(GEditor->GetActiveViewport()->GetClient());
if (ViewPortType) {
client->SetViewportType(ViewPortType); //this doesn't work properly
client->Invalidate();
}
client->ViewFOV = newFoV;
client->SetViewLocation(newLocation);
client->SetViewRotation(newRotation);
}
This can be called from a BlueprintFunctionLibrary, though needs the module, set in the build.cs:
if (Target.Type == TargetRules.TargetType.Editor)
{
PublicDependencyModuleNames.Add("UnrealEd");
//also tried PrivateDependencyModuleNames.Add("UnrealEd");
}
I tried a bunch of stuff already and i can never get a camera in the editor that matches exactly the isometric level i have.
Perhaps is there a way i can manipulate the level, and design the level, at runtime? Is this possible somehow as a last resort alternative?
Any feedback is greatly appreciated.