Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Slide along attachment point
#4
(11-12-2020, 06:04 PM)llevine Wrote: Thank you! You can ignore the "when enough force" part. I understand what you're saying, and am guessing I need to implement my own pinhole constraint as a new constraint type. Could you point me in the direction of how to constrain only two translational DOFs? I see in ObiParticleAttachment that the UpdateStaticAttachment method sets solver.angularVelocities[solverIndex] = Vector3.zero. Would changing this value in 1 dimension give me what I want?

It's unfortunately not as simple as setting the angular velocity. Writing new constraints requires you to have some understanding of constrained dynamics. Obi uses eXtended Position-Based Dynamics (XPBD), you can refer to the original XPBD article for the math involved. Equation 18) in this article is the one used to implement constraints:

https://matthias-research.github.io/page...s/XPBD.pdf
Reply


Messages In This Thread
Slide along attachment point - by llevine - 09-12-2020, 04:28 AM
RE: Slide along attachment point - by josemendez - 09-12-2020, 09:03 AM
RE: Slide along attachment point - by llevine - 11-12-2020, 06:04 PM
RE: Slide along attachment point - by josemendez - 14-12-2020, 08:20 AM