PaulR
PaulR

Reputation: 726

Farseer/Box2D - constrain rotation of Revolute Joint (or other) to one direction?

I am trying to create a machine in Farseer (based on Box2D) which requires the use of one-way bearings so that a weight pivots around a point in an anti-clockwise only direction.

I have the weights attached using Revolute joints and everything is working apart from this issue. I need the force of gravity on the weight to still affect the machine. So it should swing out and not be able to swing back with the physics of the movement still there.

If anyone has any ideas as to how I could accomplish this I would be very grateful.

Upvotes: 1

Views: 730

Answers (1)

iforce2d
iforce2d

Reputation: 8272

Unfortunately Box2D doesn't come with this feature 'out of the box'. You could enable limits for the revolute joint, and adjust one of the limits to the current rotation every time step.

Upvotes: 1

Related Questions