diff --git a/EntitiesSamples/Assets/Boids/Scripts/BoidSystem.cs b/EntitiesSamples/Assets/Boids/Scripts/BoidSystem.cs index 84eb60779..634a7df1c 100644 --- a/EntitiesSamples/Assets/Boids/Scripts/BoidSystem.cs +++ b/EntitiesSamples/Assets/Boids/Scripts/BoidSystem.cs @@ -221,8 +221,8 @@ public void ExecuteFirst(int index) public void ExecuteNext(int cellIndex, int index) { cellCount[cellIndex] += 1; - cellAlignment[cellIndex] += cellAlignment[cellIndex]; - cellSeparation[cellIndex] += cellSeparation[cellIndex]; + cellAlignment[cellIndex] += cellAlignment[index]; + cellSeparation[cellIndex] += cellSeparation[index]; cellIndices[index] = cellIndex; } }