How to create moving platforms in farseer 2.1.X?

Topics: User Forum
Feb 23, 2011 at 6:05 PM

Hello!

Which is the "correct" way of creating a moving "floating" platform that players can walk on (and the platform does not get affected by the player standing on it)? It's easy with non-moving of course, since we just make the body static. However, a moving, floating platform that doesn't get affected by anything except my forces that I apply to them, I don't really know how to do that. It would be great if it could rotate freely too, but that is probably solved with a joint if the other thing works. Anyone has any ideas? Thanks

Mar 13, 2011 at 12:22 AM
Edited Mar 13, 2011 at 12:33 AM

I'm looking into this too.  Found this page which suggests using a FixedPrismaticJoint.  Will update if I get it working.  Not sure if it's available in 2.1 though - I'm working with a week old build of 3.3 (85371).

Apr 22, 2011 at 12:13 PM

Did you manage to get this going?

Apr 22, 2011 at 1:06 PM
You may want to look into using a slider joint. You can check out the old documentation for fpe 2.1 http://www.farseergames.com/storage/farseerphysics/Manual2.1.htm hope this helps.

Sent from my Windows Phone

From: Spruce
Sent: Friday, April 22, 2011 7:13 AM
To: rockstarg33k@hotmail.com
Subject: Re: How to create moving platforms in farseer 2.1.X? [FarseerPhysics:247265]



> From: Spruce
>
> Did you manage to get this going?
>
>
May 1, 2011 at 10:30 PM

Yeah, forgot to reply back.  I got it working with a FixedPrismaticJoint.  It doesn't appear to be in the JointFactory in 3.3 so I had to create it manually.  However, if you're still using 2.1, the manual process should be much the same.  Example code here, look at line 33.  This restricted only to the X axis, no left or right limits imposed by the joint.