Jump to content

[SOLVED] Locking movement of an object to one axis


Recommended Posts

That doesn't seem right. If I mess with the absolute position of the object I just end up fighting the physics engine and the gravity doesn't work properly. The object just jutters slowly downward, never picking up any speed. Shouldn't I be modifying some phsics based property? I've also tried doing what u suggested with get/setLinearVelocity and also attempted to apply an opposite force with addForce, but neither of these seem to have any effect.

Link to comment
  • 2 weeks later...

I've been playing around with the prismatic joints on and off for a few days and have almost convinced them to do what I'm after. Struggling to get all the parameters right though. Could you please clarify what effect linear softness and restitution have on the joint?

Link to comment
  • 1 month later...

I've updated function descriptions (see Joint class). In brief, restitution and softness together control the rigidity of a joint.

  • Rigidity determines if the joint snaps bodies into place or they are drawn back gradually. This parameter controls how fast the joint tries to restore coordinates of the bodies.
  • Softness allows the joint to be like a jelly: you touch one body and the second body on the other side also gets moving. This parameter determines if the joint tries to equalize velocities of bodies it is connecting.

Link to comment
  • 2 weeks later...

I have got the joints working. I thin my original problem was that the anchor wasn't in quite the right spot. Thanks for the clarification of those parameters though. Makes more sense now.

Link to comment
×
×
  • Create New...