Pbd Rigid Body Haptics/Virtual Coupling
Whilst pbd rigid body wasn't necessarily added for haptics. It is well suited for it provided some issues are worked out.
I tried the naive implementation of pbd haptics with virtual coupling. By using the external force one can sum into the velocity applied before pbd integrations positions at the start of its pipeline.
Compute Virtual Coupling Force from difference in positions and with velocity damping
Integrate Positions (apply force to velocity, and velocity to position producing newPos)
Modifying newPos
Compute velocity from change in position prev to newPos
For some reason this shows extreme instability compared to the rigid body. Why is not yet clear to me. There's some specific models for damping introduced in some pbd papers. It might be worth investigating those.
Edited by Andrew Wilson