Improve selecting spline gizmos and add highlight sphere

This commit is contained in:
Wojtek Figat
2021-01-27 12:38:03 +01:00
parent 590fcebaec
commit 3dc6afef62

View File

@@ -40,12 +40,16 @@ namespace FlaxEditor.SceneGraph.Actors
var actor = (Spline)_actor.Actor;
var pos = actor.GetSplinePoint(Index);
normal = -ray.Ray.Direction;
return new BoundingSphere(pos, 5.0f).Intersects(ref ray.Ray, out distance);
return new BoundingSphere(pos, 7.0f).Intersects(ref ray.Ray, out distance);
}
public override void OnDebugDraw(ViewportDebugDrawData data)
{
ParentNode.OnDebugDraw(data);
var actor = (Spline)_actor.Actor;
var pos = actor.GetSplinePoint(Index);
DebugDraw.DrawSphere(new BoundingSphere(pos, 5.0f), Color.Yellow, 0, false);
}
}