Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Total impulse of cpDampedRotarySpring is wrong, it adds the damping instead of subtracting it. #248

Open
viblo opened this issue May 5, 2024 · 0 comments

Comments

@viblo
Copy link

viblo commented May 5, 2024

In the DampedRotarySpring the total impulse is collected in jAcc.
The logic is:

  1. In preStep: impulse = springTorqueFunc(...)*dt
  2. In applyImpulse: impulse += damping torque

However, in the applyImpulse function the damping torque is subtracted from body a's angular velocity, while the impulse in preStep were added. Therefor I believe it should be impulse -= damping torque instead in applyImpulse.

I will make a PR when Im more confident of this finding.

(I noticed this while trying to implement maxForce for the springs: #245 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant