BatBut Posted November 16, 2017 Share Posted November 16, 2017 Hello! I had a look at the forum and couldn't find any advice on this previously (/I don't know the terminology to look up) so I thought I would post and see if anyone could give advice. I am using revolute constraints in my project because I wanted, as you can image, a joint that allows rotation and allows the player to rotate it with keys. The issue is that they are just flopping around the revolution instead of being rigid until the player turns them. I went through the documentation and found other types of constrains, like lock constraints, but they don't seem to work, and I have even tried turning off gravity for the arms to see if that was the issue to no luck. The code for the constraints is below, and I am sure I am missing something obvious so any advice would be great! backConstraint = game.physics.p2.createRevoluteConstraint(player, [-5,-20], backArm, [-20,0.5]); frontConstraint = game.physics.p2.createRevoluteConstraint(player, [-5,-20], frontArm, [-20,0.5]); Link to comment Share on other sites More sharing options...
BatBut Posted November 16, 2017 Author Share Posted November 16, 2017 And of course as soon as I post this I figure out the problem... sigh So it turns out if you set the angular velocity to 0 in the update function, you lose all floppiness... Link to comment Share on other sites More sharing options...
Recommended Posts