mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Fix #1834: Give MouseJoint a sensible stiffness and damping initial value
This commit is contained in:
@@ -49,6 +49,7 @@ MouseJoint::MouseJoint(Body *body1, float x, float y)
|
||||
def.bodyB = body1->body;
|
||||
def.maxForce = 1000.0f * body1->body->GetMass();
|
||||
def.target = Physics::scaleDown(b2Vec2(x,y));
|
||||
b2LinearStiffness(def.stiffness, def.damping, 5.0f, 0.7f, def.bodyA, def.bodyB);
|
||||
joint = (b2MouseJoint *)createJoint(&def);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user