bepuphysics2 icon indicating copy to clipboard operation
bepuphysics2 copied to clipboard

Check compound bounding box velocity expansion

Open RossNordby opened this issue 6 years ago • 2 comments

I'm pretty sure when I implemented compound bounding box calculation initially, I did not bother to properly handle velocity expansion. It just uses the compound velocity to expand every child. That works okay for linear motion, but fails to handle the full arc induced by angular motion.

When it's time to revisit CCD, go back and confirm/fix this.

RossNordby avatar Jul 03 '18 21:07 RossNordby

cad353fb4996d27adf7b90b7c7c4e1cbf63eaf6b adds a partial solution to this. It'll work for now, but it's not strictly correct.

A couple of closer-to-actually-correct options:

  1. Add a persistent continuation for compound batches that tracks child completion and angular expansion metadata, then in the postpass apply an expansion.
  2. Somehow give the convex path more information to work with to allow it to expand children appropriately when there's a compound parent.

Trying to push v2.0 out sooner than later, so I'm deferring this until later.

RossNordby avatar Apr 15 '19 16:04 RossNordby

Related: the per-pair local space bounding box expansion is iffy. The compound-compound sweeps were outright broken until recently.

It's likely that it could be tightened by using arc bound expansion (trace the child through its path induced by angular motion in its own local space, and then take the whole bounds and trace it through the path induced by B's angular motion). Keep in mind that the bounds are being sweep tested against the tree, so it doesn't make sense to arc expand A, sweep it, and then arc expand that whole thing. Complexity.

RossNordby avatar Aug 10 '20 02:08 RossNordby