npc move to X,Y smooth

Good afternoon,

I am working on a A.O.E style game and am currently implementing the target positions for villagers,
I do not need to do any A* pathfinding due to there being no obstacles but I also dont want to do some ugly: if (x < x2) x++; style movement as its ugly when the npc reaches its destination on one axis and then just walks strate, is there any nice, smooth technique for me to give an npc a destination for it to move and have it follow a soft like to its destination.

Martin

My original idea was to have each npc take its current position and it target position and create a spline path to follow, I am researching it now but didnt know if you guys had any better ideas?

Thats a good Idea. And the target position can only change, if your current position equals the target position :wink:

Thats how it’s done mostly.

:smiley: Thanks

I was having a look at this: http://www.aurelienribon.com/blog/projects/universal-tween-engine/

Its looks to be what I am looking for, will have a play when I get home.