Added OrthographicCamera actor. Arguments are:

- 0: Offset. This pushes the camera further away, going behind the camera. Default is 1.0 (converted to negative - the value cannot go lower than that).
This commit is contained in:
Major Cooke 2024-10-26 21:50:18 -05:00 committed by Ricardo Luís Vaz Silva
parent 0fe2d72b75
commit 1620d405c6
2 changed files with 33 additions and 0 deletions

View file

@ -78,6 +78,7 @@ DoomEdNums
9081 = SkyPicker
9082 = SectorSilencer
9083 = SkyCamCompat
9084 = OrthographicCamera
9200 = Decal
9300 = "$PolyAnchor"
9301 = "$PolySpawn"

View file

@ -212,3 +212,35 @@ class SpectatorCamera : Actor
}
}
}
Class OrthographicCamera : Actor
{
Default
{
+NOBLOCKMAP
+NOINTERACTION
CameraHeight 0;
RenderStyle "None";
}
override void PostBeginPlay()
{
Super.PostBeginPlay();
UpdateViewPos();
}
override void Tick()
{
if (current != args[0])
UpdateViewPos();
Super.Tick();
}
private int current;
private void UpdateViewPos()
{
current = args[0];
SetViewPos((-abs(max(1.0, double(current))), 0, 0), VPSF_ORTHOGRAPHIC|VPSF_ALLOWOUTOFBOUNDS);
}
}