You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wow, I was going through the exact same code and I had the same question... I understand why and how the impulse.y and impulse.z are calculated, but like you said, it wasn't explained how or why impulse.x is calculated in dynamic friction.
My initial assumption was to leave it as it was after it was generated from the impulse matrix (like you asked about), but that doesn't work and makes the objects move too fast and explode (testing with a high restitution).
I understand why you need deltaVelocity.data[0], because this is the x component of the first vector in the delta velocity matrix, which represents the amount of velocity per unit of impulse in the direction of the contact normal (the x axis), but adding "deltaVelocity.data[1]_friction_impulseContact.y" and "deltaVelocity.data[2]_friction_impulseContact.z" make no sense to me.
That one line has got me so stumped that I had to do all the work for friction in 3D even though I'm implementing a 2D physics engine, just to get it to work (setting Z=0 for all objects and rotations); I have no idea how to convert that one line to its 2D conterpart.
I know this post doesn't help you much, but I thought I'd share my thoughts on the issue. I find it crazy how I was on the exact same problem today and I just randomly decided to check this site.
I know this is an old issue, but has anyone found a solution to this? The only one I've found is by just omitting dynamic friction entirely but obviously that means no sliding.
please, why add these code for impulseContact.x in dynamic friction:
impulseContact.x = deltaVelocity.data[0] +
deltaVelocity.data[1]_friction_impulseContact.y +
deltaVelocity.data[2]_friction_impulseContact.z;
impulseContact.x = desiredDeltaVelocity / impulseContact.x;
how derive it?
why not use impulseContact directly?
Anyone knows? thanks.
The text was updated successfully, but these errors were encountered: