PastPresentController.cs

 PastPresentController.cs

This script moves the linked object object based on the past object.


Start():

It sets the previousLocation to the starting position of the object.


Update():

This function will move check if the object has moved by checking if the previousLocation is the same as the current location of the cube. If it isnt, it will set the linkObject to the new position + the offset of the future location. 

For example:

If the position of the past object is 120, 0, 140 and the past object moves to 122, 0, 140 and the offset is 1000, the future object will move from 1120, 0, 140 to 1122, 0, 140.

Comments