Hello,
I’m using GetPointsAroundPointWorld to transform a list of vectors, based on a ray hit.
When I play the game from the unity editor, it works perfectly.
When I Build & Run the game, the list is always changed to 0,0,0.
Anything you can suggest? Code below:
Ray ray = Camera.main.ScreenPointToRay(mouseClick);
RaycastHit hit;
if (Physics.Raycast(ray, out hit, float.PositiveInfinity, ground))
{
List<Vector3> current = selected.Select(u => u.destination.GetValue()).ToList();
Pathfinding.PathUtilities.GetPointsAroundPointWorld(hit.point, AstarPath.active.data.recastGraph, current, 0, 0.75f * 2);
for (int i = 0; i < selected.Count; i++)
{
selected[i].destination.SetValue(current[i]);
}
}