Transforms..and intervals..

Hello !..

I’m obligated to use an interval animation since Animation editor takes two determined vectors to achieve an interval…

In this case if I have one of my objects moving freely (user determines where to move it), and then I want to roll back my object to its original point (or vector) with an interval… how can i do it?

I was using Panda3D 1 year ago… using python, what I was do is something like this:

objectFree.getPos(), StartPoint(0, 0, 0), Time.deltaTime
FROM , TO , speed

this means objectFree.getPos() → This is suppose to detect the current object’s vector (for the interval, is the initial vector to roll back), then StartPoint(0, 0, 0) The beginning point… and Time… of course you know…

My little problem is that I can’t find a way to determine the object’s actual position… ( getPos() )… how is called in Unity ?

objectFree.transform.position

This gives you a Vector3 which you can use for interpolation (is that what you meant by interval?)

Yes…!.

you help a lot… i got an interval with this…

var finish : Transform;
transform.position = Vector3.Lerp(transform.position, finish, Time.time);

Both pivots indicate the source and destination vector…

thanks !