Initial commit
This commit is contained in:
17
Samples/SplineNearestPointDebug.cs
Normal file
17
Samples/SplineNearestPointDebug.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class SplineNearestPointDebug : MonoBehaviour
|
||||
{
|
||||
[SerializeField] SplinePlus splinePlus;
|
||||
|
||||
[SerializeField] float cubeSize;
|
||||
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
if (!splinePlus) return;
|
||||
|
||||
splinePlus.GetNearestPoint(transform.position, out Vector3 position, out _);
|
||||
|
||||
Gizmos.DrawCube(position, Vector3.one * cubeSize);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user