[SOLVED]Easy way to move object back to default position?

Hello,

sorry, if this has already been covered, I couldn’t find any helpful results via search. The following task shouldn’t be too hard, however I’ve had some issues to find a solution.

Let’s say my object is at position x,y,z - somewhere in my 3D space. Now I’m looking for a simple method, that will bring back my object to it’s default position (e.g 0,0,0). I don’t want to simply set it to it’s default position, but create a smooth translation/rotation, so it will move back and maybe rotate back to my previously defined default coordinates/rotation.

Any help on how I should start working this one out would be greatly appreciated.
Thanks in advance.

Hello!

Yes interpolating the values :).

for an spherical interpolation.

search for Vector3.Lerp for a normal interpolation :).

hope it helps :wink:

I think what you are looking for is a Liner Interpolation of two points in space.

Alternatively, if you want the transition to ease in / out, you can try a ‘slerp’, or spherical interpolation.

edit curses! You beat me to it, naruse :stuck_out_tongue:

Thanks for the ideas!