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.
Paternoster lift (or prismatic joint along a path)
Re: Paternoster lift (or prismatic joint along a path)
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: 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:
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
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: 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