PDA

View Full Version : Ok..simple one for ya



glasseye
06-14-2005, 09:50 AM
Ok. I'm assuming that you will know how a car engine works. ( sorry if you dont)

A really nooby question, but hey. what are forums for.

Im trying to create a crankshaft with conrods and pistons. And I cannot see the point of expressions if parenting should work for such a simple thing.

I have my crankshaft keyframed to rotate 360.

My conrod is parented to the crank and targeted to the piston.
Now the crank and conrod rotate successfully but the conrod does not follow the target of the piston.
However the Pitch path does ( the green arrow points allways to the piston.)
Can anyone explain why my conrod rotated with the parent and the path follows but the object doesnt change its pitch to follow the target?

All the best.

toby
06-14-2005, 03:20 PM
That should work, are you sure the con-rod is pointing straght down the Z? Any deformations on it? Is the piston a part of the heirarchy? That would screw things up.

colkai
06-15-2005, 04:09 AM
My gut reaction was - are the pivot points set where they need to be for each piece?
If the object is layered, (as it should be), then the pivot for the pitson should be in the centre of the hole for the conrod pin.

glasseye
06-21-2005, 05:28 AM
Sorry for no reply. ive been away for a bit.
Cheers for the help so far.

Ive re-modelled the scene. Ive layered the object as suggested.
Now I can get the conrod to follow the piston..Yeah

However the conrod seems to rotate itself 360 deg on the first and last frame.

Nearly their.... can anyone help.

toby
06-21-2005, 02:37 PM
Of course, I should have predicted that. Whenever you target something and move the target overhead, the targeting item will flip 360. This has something to do with the coordinate system and the math it requires, like Gimbal lock - it's flipping whenever the conrod passes -90 deg.

The only way to fix this is to make sure the target doesn't go directly overhead - in your case I would rotate the piston 90 deg so that the animation is going side-to-side instead of up-and-down, then if you need it to go up-and-down, parent the group to a null and rotate that back up.