I would like to create an intelligent (universal) class to looping movement object, like sliding doors, etc.
I've thought to declare two vectors:
And a Speed variable.
Then looping. I don't know how to check when current position is >= then To and looping reverse, considering that you can have starting position (x or y or z) greater then arriving position.