# Constrain joint to path

 3 Weeks Ago cl10k C L Germany Constrain joint to path Hello everyone, I'm trying to learn the basics of rigging/constraint driven animation. For this I'm trying to animate a simple radial piston engine. I used these tutorials as a start: ﻿https://www.youtube.com/watch?v=j7kc0geXHJY&t=246s ﻿https://www.youtube.com/watch?v=_KkgwIksAhY But I have trouble setting up some of the constraints... (Please see attached sketch of a very simplified mechanism) The Bone is a placeholder for a piston rod. It's base (1) is attached to the circle, rotating around the center (c). So far so good. Now I want the top of the bone (2) to move only along the direction of the second linear path (p), while maintaining it's length (the curve only defines a direction not the extends of the motion). I tried "everything" :/ Point and Aim Constraints, motion path etc, but can't get it to work. Any help is greatly appreciated. (You can download this simple *.ma if you'd like to play with the problem) kind regards Christian PS: If you think that cgsociety is not the right place for beginner questions, please leave a link to a more appropriate forum Last edited by cl10k : 3 Weeks Ago at 09:51 PM. share quote
 3 Weeks Ago shinyprem Expert   portfolio Prem Anand Earnest Dhass Team Lead Rigging Technicolor India Bangalore, India HI Assuming that the circle is the crank shaft, the bone you have placed as connecting rod of the piston, you want the connecting rod to be connected to the piston and the crank shaft. You need to have a point on on the crank to which the connecting rod big end is to be attached: Select two edge on the crank where the big end of the connecting rod has to be attached. and run this script﻿. Now attach the Joint 1 to it . Similarly attach the top end of the connecting rod to the Rivet created using the same script or simply to the connecting pin of the piston (since it would not rotate). Now you will get the desired motion. Regarding the constant length of the connecting rod the model measurement has to be well calculated and accurate. Or else the connecting rod being skinned to joint 1 and joint 2 will stretch. (rotation of the crank + the translation value of the piston should always keep the constant distance between the  piston connecting pin of the piston and the attaching point of the big end of the connecting rod to the crank) Note: Connect using Point constrain if you do not get desired rest use parent constrain and then select the rotation rx, ry, rz and do break connection. Regards, __________________ Prem Download Vehicle Rig Blog share quote
 1 Week Ago cl10k C L Germany Hi shinyprem, thanks for your extensive answer. Unfortunately you didn't cover the central problem of constraining the movement along an arbitrary axis (or I didn't understand). In the end I managed to solve my problem with the help of this video about spline ik and I'm satisfied with the result... regards Christian share quote

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off CGSociety Society of Digital Artists www.cgsociety.org Powered by vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.