Path Generator - Farseer V2.1.3

Topics: User Forum
May 13, 2010 at 4:20 PM
Edited May 13, 2010 at 4:21 PM

Hey,

I have seen this point in the features of the Farseer Physics 2.1.3:

In Farseer Physics Engine 2.0, we included something called a Path Generator. What it does, is that it can create bodies along a curve, and link the bodies together with a joint or spring. This can be useful in a lot of ways:

  • Creating tank tracks
  • Rope bridges
  • Chains

    Just to mention a few.

    The Path Generator lives in the Path class and it's used in the ComplexFactory to create chains and rope. By using the Path Generator, only the imagination limits the creation of linked bodies.

    You can also ask the Path Generator to create geometries for all your bodies. This enables collision with other objects .

    I'm not sure what I can really do with the path generator. In my 2D Rollercoaster game there should be a chain to get the train on the top of the hill. Do you think I can use this feature for the roller coaster chain?
    Are there any examples/documentation how it will work? Thx

    greets stefan

 

Coordinator
May 17, 2010 at 5:39 PM
The path generator creates a string of bodies along a curve/path and has the ability to connect those bodies together using joints or springs. We have a reworked version of the path generator in FPE 3.0 - have a look at the testbed sample (inside FPE 3.0 samples) to see the path generator in action. If you want to use the FPE 2.x engine, download the advanced samples and take a look at the chain sample or the tank tracks.