mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-19 23:11:03 +00:00
Visual Mode: looking through selection now applies the thing's pitch to the camera
This commit is contained in:
parent
1d6c2a1c13
commit
ed93c4d69b
1 changed files with 9 additions and 2 deletions
|
@ -4339,6 +4339,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
General.Map.VisualCamera.Position = visualThings[0].CenterV3D; //position at thing
|
||||
General.Map.VisualCamera.AngleXY = t.Angle - Angle2D.PI;
|
||||
|
||||
if (General.Map.UDMF)
|
||||
General.Map.VisualCamera.AngleZ = Angle2D.DegToRad(t.Pitch) + Angle2D.PI;
|
||||
else
|
||||
General.Map.VisualCamera.AngleZ = Angle2D.PI;
|
||||
}
|
||||
}
|
||||
|
@ -4787,7 +4791,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
foreach (Thing t in things)
|
||||
{
|
||||
t.Rotate(General.Map.VisualCamera.AngleXY - Angle2D.PI);
|
||||
|
||||
if (General.Map.UDMF)
|
||||
t.SetPitch((int)Angle2D.RadToDeg(General.Map.VisualCamera.AngleZ - Angle2D.PI));
|
||||
|
||||
((BaseVisualThing)allthings[t]).Rebuild();
|
||||
|
||||
General.Interface.DisplayStatus(StatusType.Action, $"Applied camera rotation and pitch to {things.Count} thing{(things.Count == 1 ? "" : "s")}.");
|
||||
|
|
Loading…
Reference in a new issue