trying to recenter my player at end of level

After the level is completed (top down shooter type game) I want the player to return to center. But what I would like is to get the player moved from it’s last position to the center. I don’t want it to just appear.

I’m a complete noob at this right now. it looks like I want to use transform.Translate but I can’t seem to get it to stop unless I need to add this to a if statement.

Any help or point in the right direction will be very appreciated.

TIA

You can stop/pause the game with time.timescale = 0 and then use lerp to move your player ship to it’s original position, a sample code is her for doing lerp:

Hope that helps you pal.

I was able to get it to work. Using

transform.position = Vector3.Lerp( transform.position, target.position, speed * Time.deltaTime);

The target is calling a empty game object at 0,0.2640817,0 and is moving my player there x and z however are just slightly off while y is right on the money. Is there away I can get this to make sure x and z are at 0?