Simple example script for a 2d top down character (y up axis)?

Hello, I am using the newest free version of the pf system. I’m trying to set up (xz/y up)movement for a top down sprite character without any rotation and without Rigidbody and CharacterController. What I did was to change the AIPath script on the character.
In the Update function I replaced the line

transform.Translate(dir*Time.deltaTime, Space.World);
with
transform.position += dir * speed * Time.deltaTime;

this makes the character move to the target point but as soon as it gets there it starts jittering for a random amount of seconds until it finally stands still. I really tried to alter every inspector setting, both on the seeker script and on the grid manager itself, but to no avail.

Could someone who actually managed to set up a script for a 2d top down sprite character lend me a hand? Thanks!

EDIT:

I am using a Grid Graph identical to the one in the Grid Graph Example.

Hi

I am in the process of writing some 2D scripts. Here are the 2 scripts required for top-down movement.
http://pastebin.com/mVqA0fHu
http://pastebin.com/pkN8vNRz

or you can use this simpler script
http://pastebin.com/DvjRLQLV

[for future readers: the built-in AIPath and AILerp movement scripts now support movement in the 2D plane perfectly well, so use those instead. See https://arongranberg.com/astar/docs/pathfinding2d.html]

I’ll instantly have a look at these scripts. Thank you Aron!

Very good, the AISimpleLerp script almost works as expected, the problem is, the movement isn’t smooth like in the “AIPath2DTopDown” and if I put AIPath2DTopDown onto my character it flips criss cross, I guess because it expects z as the up axis, but my whole project is y-up. :frowning:

Is it possible to simply change some variables in the AIPath2DTopDown script to male it work like SimpleLerp (with smoothness)?

Is Y the up axis??
I thought all Unity 2D projects had Z as the up axis (i.e they are in the XY plane).

Sorry for the confusion. Indeed all Unity 2D projects use z axis up vector I guess, but I myself have decided to start developing a 2D Top Down Game in Unity 3D with Y up because I find it more natural than using Z up. I should have been more clear in my first post.

But still the SimpleLerp script does the trick for me and if I can somehow manage to bring smoothness to the movement it will be perfect for my needs. Any advise is very welcome.

Well, you should just be able to use the standard movement scripts since they all assume Y=up.