Bezier.BezierPath.place2d C# (CSharp) Method

place2d() public method

public place2d ( Transform transform, float ratio ) : void
transform UnityEngine.Transform
ratio float
return void
        public void place2d( Transform transform, float ratio )
        {
            transform.position = point( ratio );
            ratio += 0.001f;
            if(ratio<=1.0f){
                Vector3 v3Dir = point( ratio ) - transform.position;
                float angle = Mathf.Atan2(v3Dir.y, v3Dir.x) * Mathf.Rad2Deg;
                transform.eulerAngles = new Vector3(0, 0, angle);
            }
        }