-
Notifications
You must be signed in to change notification settings - Fork 742
Closed
Description
Has anyone else ever had this problem? I've been trying to nut it out all day.

I initialise the two boxes like the picture on the left, but when I apply the LockConstraint, both boxes quickly rotate around so that they are aligned (but offset) like the picture on the right, and then lock into place like that.
My code for applying the constraint is simply:
var c = new CANNON.LockConstraint(bodyA, bodyB, {
maxForce: params.maxForce || Number.MAX_VALUE
});
c.collideConnected = false;
this.world.addConstraint(c);
I haven't fully tested other constraint types for similar behavior, but preliminary tests show similar behavior - if the bodies have different orientations, they will be aligned when I add the constraint.
Metadata
Metadata
Assignees
Labels
No labels