Piston

Moving jawAuthor: davidc
Total downloads: 2,380
Latest version: 1.0
Release date: 05/24/2009 - 05:29
Install Now
with GooTool
Overall rating
4
Your rating: None Average: 4 (17 votes)

This is a demonstration on how to create sinusoidal linear motion, using a piston to transfer rotational into linear motion.

This is a playable level, but to see how it works, edit the level and turn visualdebug on, and adjust the minx to -1000 and maxx to 1000. Then scroll left to see the piston.

A useful property to be aware of is contacts="false" on non-static geometry. This prevents it from interacting with any other geometry or balls, allowing you to place the piston off-screen and use a long drive shaft with contacts="false" to transfer the motion to the correct place. This is not particularly used in this demo level except to create the horizontal guide rail.

I also use contacts="false" on the piston rod to prevent it interfacing with the shaft, allowing for a shorter rod and a longer, steadier shaft. This isn't particularly relevant if the piston is offscreen, but is useful for space-saving when it isn't.

The max distance travelled by the rod is of course dependent on the radius of the flywheel. Remember to adjust positions (particularly of the invisible hinges) when changing this. The speed is controlled by the rotspeed on the flywheel.

In this level I wanted to move a structure horizontally. Of course the structure has weight and sags to the ground on the non-hinged edge. To get around this, I built a long thin guide rail across the screen, which attachs to another rod in a shaft offscreen to the right. I set contacts="false" to prevent it interacting with anything, and then I hinged the structure to the guide rail in two separate places.

You can't use line walls, because anything non-static the "wrong" side of them is considered illegally placed and ODE goes berserk trying to stabilise the simulation. For this level I replaced them with large rectangles.

The scene XML is commented to show how it works.

There are 4 screenshots.

Moving jaw
Piston on left
Extra rod/shaft on right for support
Guide rail across the screen
VersionPlatformRelease DateFilenameSizeDownloads
1.0AllSun, 05/24/2009 - 05:29net.davidc.test.piston_1.0.goomod4.36 KB2,380

There is 1 current download.