Itween CRSpline to BezQuad

Hello, I’m making a game in college and I’m using ITween path (CRSpline), but need something more fluid, I saw that in ITween, Bob Berkebile used the code for CRSpline in this post written by Andeeee
http://forum.unity3d.com/threads/32954-Waypoints-and-constant-variable-speed-problems?p=213942#post213942

Is there any way to implement the QuadBez inside ITween, or some other similar solution? :slight_smile:

public class QuadBez {

public Vector3 st, en, ctrl;

public QuadBez(Vector3 st, Vector3 en, Vector3 ctrl) {
	this.st = st;
	this.en = en;
	this.ctrl = ctrl;
}


public Vector3 Interp(float t) {
	float d = 1f - t;
	return d * d * st + 2f * d * t * ctrl + t * t * en;
}


public Vector3 Velocity(float t) {
	return (2f * st - 4f * ctrl + 2f * en) * t + 2f * ctrl - 2f * st;
}

alt text

Check out this post on my blog, I think it’s exactly what you’re looking for.

http://aminorcsharpblog.blogspot.com/2012/02/space-ship-game-step-1-dynamic.html

Thanks! Worked great!!! Im very happy now :smiley: