How to create a code controllable joint?

Oct 25, 2008 at 3:30 PM
Hi guys, I'm trying to make some stairs (or rather a slope) that the joint is controllable in code, so that they flip from angle A to angle B thus changing the slope between two platforms, as bellow:




              /   -------------
Ignore the crap ascii art ;)
...but there doesn't seem to be a joint type that deals with this.

First off, I need it to attach to a world position, so I'm after one of the Fixed points. The FixedRevoluteJoint doesn't seem to have a target angle settable, where the FixedAngleJoint does... but I also need to set the anchor point so it is not in the centre of the body,which the FixedAngleJoint doesn't handle. Anyone have any suggestions? I could have a go at creating another Joint type but fear it may not be easy for me, and would also break my Farseer code should I want to upgrade to 2.0 when it has it's final relase.

Any suggestions would be much appreciated! :)


Oct 26, 2008 at 12:18 AM
You could try both joints together. A good place to find out info on the joints would be to download the latest source code and check out the documentation.