Original Post
Hi all! Again I have a question! I now implemented a PGS (after Erin Catto) as constraint-solver and modelled all collision through normal and friction constraints. So far, collision response works well --> therefore the solver seems to be implemented correctly. Now I wanted to add some joints. Started with simply once, like only-plane-movement. worked fine. Then I went on to ball-socket-joints. In the special-case the anchor-point is placed at each center of both bodies, it seems to work. But if not: eg for the pendulum-case it behaves very strange. Here some code how I implemented the ball-joint: Code snippet Annotations: - The c'tor of ogpVelConstraint takes the two involved bodies and the 4 vector-entries of the jacobian as argument. - I tried various values for fBias. The basic-behaviour of the sim. did not change - For those who wonder why the forth, and not the second jacobian-entry is negated, this is because of my special definition of the rotationmatrix and quaternions. Point-velocity in my case is computed after: vp = v + r x w To show you how my simulation acts, I uploaded two vids. (usually I simulate at 60Hz --> same problem). The big box is static and is used as anchor-point for the second-little box --> pendulum Without error correction With error correction (fBias == 0.1f here) I'm thankful for any suggestions what might be wrong! Thanks Black-Panther