08-13-2013, 10:06 AM
(08-12-2013, 04:00 PM)kilik Wrote: it's work ! yes sorry for that's
i need realy help here it's easy !
i'am on NGON and i try place object in space around
script1.SetOrientation = false;
obj.transform.eulerAngles = Vector3(0, 0, Random.Range(0,360));
See CurvySpline.GetExtrusionPoint(), that method calculates you a point on a virtual tube around the spline. Small example:
Code:
var radius=2;
var angle=180;
var pointAroundSpline=mySpline.GetExtrusionPoint(mySpline.Interpolate(0.5f), mySpline.GetTangent(0.5f), mySpline.GetOrientationUpFast(0.5f),radius, angle);