01-24-2014, 09:27 AM
(01-24-2014, 12:08 AM)'savely00' Wrote: Is there a way to pass initial object rotation to make it a curved route , not a straight line without too much calculations?
You can set CP rotation easily by altering a CP's transform (access it using mySpline.ControlPoints[x]), but that would only change orientation (=the Up-Vector) of the spline, not the curve itself.
Having a spline with just two CPs will result in a straight line, no matter what. You'll need to tell the spline more about the curvation you want:
- Let AutoEndTangents enabled and add a CP in the middle that the curve will go through automatically
- disable AutoEndTangents and use 4 CPs. Set CP 1+2 to your start and end position and use CP 0 and CP 3 to define the curvation
- Use 2 CPs like now but set Interpolation to Bezier and alter the Handles to define the curve
Jake