|
Halbert Bienenstich
Registered User
Join date: 18 Dec 2005
Posts: 36
|
03-21-2006 10:55
Well, one tough problem to crack is scripting the movement of a connecting rod between a piston assembly and a camshaft. One end of the connecting rod is limited to moving along a single axis (end attached to the piston assembly) while the other end of the rod would move in two axis, specifically in a circle (end attached to the camshaft). Also the connecting rod is henge attached to both the piston assembly and the camshaft as well as being part of the link set. Using llSetPos() to animate the piston assembly and llSetRot() to animate the camshaft seem doable. But the combined llSetPos() and llSetRot() to animate the connecting rod is much more complicated since they apply to the center of the connecting rod. Make this all stay together and looking smooth will be an even bigger chore. Anyone got some advice or examples? One poster (Jesrad Seraph) here mentioned a "multijoint" open source but that particular post in the scripting library forum but that doesn't appear to be around anymore. It would be nice if henges were the magic to keep the thing together and moving like a connected machine components. But I'm guessing it not capable of doing that.
|
|
Nexus Nash
Undercover Linden
Join date: 18 Dec 2002
Posts: 1,084
|
03-21-2006 22:24
Sounds like a cool project. You should be able to pull that off with some heavy syncro and a couple of llSetRot() and llSetPos(). However not for the faint of heart. I would probably have to whip out a math book and a couple sheets of paper and do it by hand first :\ I suggest you do that first. The math isn't your biggest problem, it's syncing up everything. I would probably recomend making each piece act in an independant way vs all the other pieces. And just have 'firing' cycles to hold the peices that are too fast, or speed up the slow ones. So that your motor is synced everytime a full turn is done the engine. I don't recommend you to make it spin faster then like 120 RPMs, I don't think LSL can process that fast. MAYBE 2 to 4 cycles a sec, I don't think you'll see anything faster, or you might just blow up the sim 
|