Problem repositioning moving columns using empty
Hi everyone I am having a problem repositioning an object that is constantly moving. The point is that I have 2 platforms that are constantly moving and use an empty object to reposition them when they reach a certain position ... However I can't understand why one is positioned correctly and the other is a bit run. As the program progresses the platform is further away .. The 2 platforms have the same script Did someone pass this to him? ... How did they fix it?
Perhaps you've already fixed the problem, but when I clone your github repo, I don't have any gaps between the platforms. I had to switch the build target to Linux, but that shouldn't have made any difference
Excuse me if I fix it using 2 separate scripts.
You can replicate the problem in two ways:
-Reposition the floor in the same script that is used to move using update or fixedUpdate.
-In the repositioning script change the update to fixedUpdate and you will also see it.
To fix it I had to use a script with an update only for repositioning and another script with a fixedUpdate only for movement.
I am not clear why this happens, they told me that there is a desynchronization with the update, but I would like someone to explain it to me better or show me another solution.
I also have the doubt and I would like you to test the problem.
This is the commit where the problem is. https://github.com/kone9/unity-2020.1-problema-al-reposicionar-plataformas-en-movimiento/tree/50c2863de7cda606d8946db0eb366d743005b6c2