Are Animations faster than Scripting linear interpolation?

I am not sure if anyone knows or has done some benchmarking, but say I want to slide an object from position A to position B - is an animation more efficient, or is a script doing linear interpolation between the two points as efficient? Are there other, more efficient ways todo this?

In any answer, would the same apply for iOS targets?

Thanks H

P.s. If nobody knows I think I'll benchmark for iOS and post my results

So, I’m going to answer this in a slightly dubious way…

We have a tile based dungeon crawler (see link in my bio for a video, coroutines used in this vid) and we were using a Coroutine to move the player from tile to tile but I’ve now changed this to an animation. I made this change this for a couple of reasons:

  1. The coroutines were messy and our controller was quite messy as a result - now much cleaner
  2. The animations just run and our controller only has to setup the animation and wait for an animation event
  3. Using an animation makes it easy for us to add a little bobbing up and down as the player moves from tile to tile (not yet added)
  4. Coroutines are quite tough to save tbh…

it certainly feels faster, the animations are much more flexible and I would hope that the fact a script isn’t being called every frame to martial the movement, that it’s all event driven, means that it is faster.

I didn’t benchmark this in a terribly scientific way, I had made the change mostly because of point 4 tbh and in doing it, the code became SO much cleaner to read, that it was worth it, provided that performance was acceptable.

We have a test LOD scene with 30 NPCs running around, sometimes all of them are in view, but either way, they are all always moving and it runs fine on 3G S and above. Animation time looking like being a typical 3MS, quite acceptable for this level of animation, including animating 7 skinned meshes as well.

Note that my answer is slightly dubious because I am saying it seems faster and it is certainly fast enough for our needs, but possibly as important is the ease of use of animations and how it helps to clean up and simplify the code.