- Home /
How to move between points smoothly
I want to figure out how I can move an object smoothly between 2 or more points.
It's quite similar to Vector3.Slerp, but this one just apply the curve path upwards and I'm trying to launch a missile and it need to have some irregular path with some crazy curves and all that. I thought in some points positioned along the path and then the missile will go through them but he'll need to do the curves smoothly.
If someone can point me in a way to get some kind of results I'll be more than thankful!
Thanks from now!
So really, what you mean is 'how to move between points irregularly'? That's kind of the opposite of what you actually said.
Yes syclamoth, Well, even if they move irregularly, they still need the smooth curves between the points. But I apologize por that contradiction. I'd considerer using iTween although I haven't tried yet. Is it too heavy for mobile or I can use it without headaches?
Answer by phren · Jun 13, 2012 at 08:13 AM
The easiest solution is probably to use some package that's already on the asset store. iTween like Bazsee mentioned is probably a good start, or just search the store for "spline" (one free result, rest are paid for).
If you insist on doing it manually you'll have to code your own spline solution. Some useful links in that case are "An interactive introduction to spline" and "Kochanek & Bartels: Interpolating splines with local tension, continuity, and bias control". Basically you'll have to fit a function to go smoothly through your points.
I quite like to make my own solutions, so I'll definitelly check these links out.