Notifications
Clear all
[Closed] Rotation script set by tangent point at nearest spline
Nov 22, 2010 7:48 pm
I am trying to set the z rotation of a point by the tangent of the nearest point on spline.
It works (though it translate the point??) in a script but I’m having trouble doing it in a controller with circular references etc.
Ln = $Line0001
Pt = $Point0001
Param = nearestPathParam Ln 1 Pt.pos
tangentBez = tangentBezier3D Ln 1 1 Param pathParam:false
theAngle = aCos (dot [1,0,0] tangentBez)
Pt.rotation = (EulerAngles 0 0 theAngle)
Eventually, I will create an average angle based from all of the sub splines in the given splineShape.
2 Replies
Nov 22, 2010 7:48 pm
Ah! FacePalm. I knew that… At one point… Thanks for the reminder. Contoller.value