Paternoster lift (or prismatic joint along a path)

General discussion about the R.U.B.E editor
Post Reply
nikcain
Posts: 7
Joined: Wed Dec 26, 2012 11:58 am

Paternoster lift (or prismatic joint along a path)

Post by nikcain »

I want to create a paternoster lift which is basically a platform that follows an elliptical path (wiki pic)

It looks like I can't use just a prismatic joint since it's only a straight line, and a revolute joint is only a circle, so maybe a mix can produce an ellipse? There's the extra step of keeping the platform level as it goes round as well. I was wondering if anyone had any ideas (plus programmatically reversing the prismatic joint when it reaches the limit, but that's ok).

I could just use a static body and programmatically move it around, but I'd still like to define the path in Rube - I don't see anything I could use where I can define an arbitary set of points, but am I missing something useful? Being able to define a path (and have it saved in the rube json file) would be generally useful possibly.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Paternoster lift (or prismatic joint along a path)

Post by iforce2d »

You could set the platforms to be fixed rotation to keep them in the right orientation.

I don't think any arrangement of the standard Box2D joints lends itself well to this construction. It might indeed be easier to use kinematic bodies and move them with SetLinearVelocity.

To define a series of points in the RUBE, you could create a n-sided polygon with say, 32 points, and then select half of the vertices, and pull them apart:
Selection_218.png
Selection_218.png (7.96 KiB) Viewed 6022 times
You might like to rotate the body a little so that the vertices can be pulled perfectly horizontal or vertical and still keep everything symmetrical:

Code: Select all

rotate (sb()[0], 0, dr(360 / (2*32)) ); // the 32 is the number of vertices you chose
After loading this fixture in your game, you can take the positions of the vertices, and destroy the fixture. This will give you a list of points from which you can create a perimeter line to move things around. This thread might give you some ideas: viewtopic.php?f=9&t=88
Post Reply