Client HUD/Renderer: fix dead laser visibility, radar orientation, Garage grow direction, chyron churn, and NativeLibraries
This commit is contained in:
parent
bb68620d1c
commit
3cb60447ff
3 changed files with 82 additions and 28 deletions
|
|
@ -282,6 +282,10 @@ public partial class ArenaRenderer : Node3D
|
|||
if (_spectatorVisuals.TryGetValue(s.Id, out var deadVis))
|
||||
{
|
||||
deadVis.Root.Visible = false;
|
||||
if (deadVis.LaserMesh is not null)
|
||||
{
|
||||
deadVis.LaserMesh.Visible = false;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
|
@ -358,7 +362,9 @@ public partial class ArenaRenderer : Node3D
|
|||
{
|
||||
vis.LaserMesh.Visible = true;
|
||||
vis.LaserMesh.GlobalPosition = (start + end) * 0.5f;
|
||||
vis.LaserMesh.LookAt(end, Vector3.Up);
|
||||
Vector3 dir = (end - start) / dist;
|
||||
Vector3 up = MathF.Abs(dir.Dot(Vector3.Up)) > 0.99f ? Vector3.Right : Vector3.Up;
|
||||
vis.LaserMesh.LookAt(end, up);
|
||||
vis.LaserMesh.Scale = new Vector3(1f, 1f, dist);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue