diff --git a/Source/Editor/SceneGraph/Actors/StaticModelNode.cs b/Source/Editor/SceneGraph/Actors/StaticModelNode.cs
index 1c09691e5..60be5bef9 100644
--- a/Source/Editor/SceneGraph/Actors/StaticModelNode.cs
+++ b/Source/Editor/SceneGraph/Actors/StaticModelNode.cs
@@ -1,5 +1,11 @@
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
+#if USE_LARGE_WORLDS
+using Real = System.Double;
+#else
+using Real = System.Single;
+#endif
+
using System;
using System.Collections.Generic;
using FlaxEditor.Content;
@@ -24,9 +30,8 @@ namespace FlaxEditor.SceneGraph.Actors
{
}
-
///
- public override bool OnVertexSnap(ref Ray ray, float hitDistance, out Vector3 result)
+ public override bool OnVertexSnap(ref Ray ray, Real hitDistance, out Vector3 result)
{
// Find the closest vertex to bounding box point (collision detection approximation)
result = ray.GetPoint(hitDistance);
@@ -37,7 +42,7 @@ namespace FlaxEditor.SceneGraph.Actors
if (_vertices == null)
_vertices = new();
var pointLocal = (Float3)Actor.Transform.WorldToLocal(result);
- var minDistance = float.MaxValue;
+ var minDistance = Real.MaxValue;
var lodIndex = 0; // TODO: use LOD index based on the game view
var lod = model.LODs[lodIndex];
{
diff --git a/Source/Editor/SceneGraph/SceneGraphNode.cs b/Source/Editor/SceneGraph/SceneGraphNode.cs
index dd6a4f9fe..b786efb7c 100644
--- a/Source/Editor/SceneGraph/SceneGraphNode.cs
+++ b/Source/Editor/SceneGraph/SceneGraphNode.cs
@@ -359,7 +359,7 @@ namespace FlaxEditor.SceneGraph
/// Hit distance from ray to object bounding box.
/// The result point on the object mesh that is closest to the specified location.
/// True if got a valid result value, otherwise false (eg. if missing data or not initialized).
- public virtual bool OnVertexSnap(ref Ray ray, float hitDistance, out Vector3 result)
+ public virtual bool OnVertexSnap(ref Ray ray, Real hitDistance, out Vector3 result)
{
result = Vector3.Zero;
return false;