I want to create a line that stays between two objects, it will be used in a character rig to show the directions of pole vectors and such.
So far I’ve used Burnett’s Null object, but I would like to make the rig free from external plugins, and I want to do this using only one object. I have a test function that uses a SplineShape with instanced controllers on each vertex, but it doesn’t work if I parent the objects that the shape gets its controllers from…
Here’s the function I made:
function createLine = ( startObj = sphere pos:[20,0,0] radius:2 endObj = sphere pos:[0,40,0] radius:2 local tShape = SplineShape pos:[0,0,0] addNewSpline tShape addKnot tShape 1 #corner #line startObj.pos addKnot tShape 1 #corner #line endObj.pos updateShape tShape startCon = Point3_XYZ() endCon = Point3_XYZ() animateVertex tShape #all tShape.controller.Spline_1___Vertex_1.controller = startCon tShape.controller.Spline_1___Vertex_2.controller = endCon startCon.controller = startObj.pos.controller.controller startCon.controller = startObj.pos.controller.controller startCon.controller = startObj.pos.controller.controller ) createLine()
Has anyone here a better suggestion?