Fix build regression from #2299
This commit is contained in:
@@ -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
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
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];
|
||||
{
|
||||
|
||||
@@ -359,7 +359,7 @@ namespace FlaxEditor.SceneGraph
|
||||
/// <param name="hitDistance">Hit distance from ray to object bounding box.</param>
|
||||
/// <param name="result">The result point on the object mesh that is closest to the specified location.</param>
|
||||
/// <returns>True if got a valid result value, otherwise false (eg. if missing data or not initialized).</returns>
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user