|
I am trying to use a rotation script to orientate a dummy to a vertex within a spline.
I can easily get the dummy to follow the vertex by using this position script -
pos = getKnotPoint $Spline01 6 3
I have tried various ways to get the vector from the inVec and outVec positions from the spline but it doesn’t seem to work!
Here’s what I am trying -
inVec = getinVec $Spline01 6 3
outVec = getoutVec $Spline01 6 3
averageVec = (inVec+outVec)*0.5
angleVec = acos (dot (normalize(getinVec $Spline01 6 3)) (normalize(getoutVec $Spline01 6 3)))
rot = quat averageVec.x averageVec.y averageVec.z angleVec
Anyone got any ideas? Any help would be apreciated.
I am using max9 32bit.
|
|
|