commadore65 Posted October 19, 2015 Share Posted October 19, 2015 Hi, I'm a bit new to this and was just playing around with the P2 Revolute Constraint example. http://phaser.io/examples/v2/p2-physics/revolute-constraintI was hoping someone might be able to advise on the best way to update the distance of constraint.Is it just set once it's been created or can I change the gap between the two bodies on the fly fairly easily. Any advice would be very helpful/welcome. Link to comment Share on other sites More sharing options...
commadore65 Posted October 21, 2015 Author Share Posted October 21, 2015 I've managed to find the right thing to tweak. It's change the pivotA from the update loop. Added this into the update: constPiv = constraint.pivotA[0];constraint.pivotA = [constPiv-0.25, -2.5]; Link to comment Share on other sites More sharing options...
Recommended Posts