Sunday 5 October 2014

Unity Bezier Curve Script

Following from my previous post I have been working on this bezier curve script in my spare time. The script was done with C# in Unity and takes an array of objects as the input. The script then creates a curve by using these objects as control points.

The script works in the viewport by utilising the gizmo object and at render time I used the Line Renderer. I found this website which goes really in depth with creating bezier curves in unity.

Unity Bezier Curve Viewport Update

Below is the entire script which I have kept in one file just for simplicity.

No comments:

Post a Comment