Skip to content

RotationalSpring damping is ignored #358

@simonbw

Description

@simonbw

The damping property on RotationalSpring doesn't seem to have any effect. I believe that is due to this line where the damping torque is multiplied by 0.

RotationalSpring.prototype.applyForce = function(){
    // ... d = damping
    var torque = - k * (x - l) - d * u * 0;
    // ...
};

It looks like this was added intentionally at some point, but I'm not quite sure why, so I figured I'd create an issue to bring it up. Removing the * 0 seemed to make this function nicely for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions