TUT – Connecting Cables 1
Xpresso – by: base80
August 15th, 2005
Once we have a piston (see TUT – Jack the Piston in Tips and Tricks) we want to connect the hydraulic cables. This tutorial can serve other things too.
Follow up:
Start by making a sweep-nurb cable using a spline and a profile. In this case I made a two point bezier spline. Of course more points can be used. Then create two null objects. Put them in the hierarchy of the parts you want to connect the cable to.
Now drag the two nulls and the spline in the xpresso editor. Then add two point-nodes. Connect the spline to both object input ports of the spline node. And connect the global position of the nulls to the position port of the spline node. Then you have to enter the index number of the spline, that is always 0 (zero) for the first point and 1 (in this case) for the last point. To be certain of the index number, select the point in the view and go to the structure manager and check the highlighted number.
Now you can animate the objects and the spline will move along with them.
! One problem can occur in this set-up; when animating the cable lags one frame behind the moving parts. To solve this I put the expresso tag at the highest priority (generators) and at -1 (minus one). Also I prefer to put the xpresso tag at the parent of the hierarchy.