Skip to content

Commit

Permalink
Fixed an issue with kinematic integration responsibilities; incorrect…
Browse files Browse the repository at this point in the history
… buffer was being cleared.
  • Loading branch information
RossNordby committed Mar 4, 2024
1 parent 4956d40 commit 6a48c1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion BepuPhysics/Solver_Solve.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,8 @@ public override IndexSet PrepareConstraintIntegrationResponsibilities(IThreadDis
pool.Take((bodies.HandlePool.HighestPossiblyClaimedId + 64) / 64, out mergedConstrainedBodyHandles.Flags);
var copyLength = Math.Min(mergedConstrainedBodyHandles.Flags.Length, batchReferencedHandles[0].Flags.Length);
batchReferencedHandles[0].Flags.CopyTo(0, mergedConstrainedBodyHandles.Flags, 0, copyLength);
batchReferencedHandles[0].Flags.Clear(copyLength, batchReferencedHandles[0].Flags.Length - copyLength);
mergedConstrainedBodyHandles.Flags.Clear(copyLength, mergedConstrainedBodyHandles.Flags.Length - copyLength);


//Yup, we're just leaving the first slot unallocated to avoid having to offset indices all over the place. Slight wonk, but not a big deal.
bodiesFirstObservedInBatches[0] = default;
Expand Down

0 comments on commit 6a48c1f

Please sign in to comment.