Skip to content

Commit

Permalink
Merge pull request #837 from FUSEEProjectTeam/feature/836-lots-of-war…
Browse files Browse the repository at this point in the history
…nings-when-using-picker-and-guitext

Lots of warnings when using picker and GuiText
  • Loading branch information
ASPePeX authored Aug 9, 2023
2 parents 0204fa9 + 55b7c6c commit 41c17b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Engine/Core/ScenePicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ private void PickTriangleGeometry(Mesh mesh)
mesh.BoundingBox = new(mesh.Vertices.AsReadOnlySpan);
}

if (mesh.GetType() != typeof(Primitives.Plane) && (mesh.BoundingBox.Size.x <= 0f || mesh.BoundingBox.Size.y <= 0f || mesh.BoundingBox.Size.z <= 0f))
if (mesh is not Primitives.Plane && (mesh.BoundingBox.Size.x <= 0f || mesh.BoundingBox.Size.y <= 0f || mesh.BoundingBox.Size.z <= 0f))
{
Diagnostics.Warn($"Size of current bounding box is 0 for one or more dimensions. Picking not possible.");
return;
Expand Down
3 changes: 2 additions & 1 deletion src/Engine/GUI/GuiText.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Fusee.Engine.Common;
using Fusee.Engine.Core;
using Fusee.Engine.Core.Primitives;
using Fusee.Engine.Core.Scene;
using Fusee.Math.Core;
using System;
Expand All @@ -11,7 +12,7 @@ namespace Fusee.Engine.Gui
/// <summary>
/// Creates a text mesh for the GUI.
/// </summary>
public class GuiText : Mesh
public class GuiText : Plane
{
private readonly FontMap _fontMap;

Expand Down

0 comments on commit 41c17b5

Please sign in to comment.