Why this solution is needed?

Hello,
Why do I need to count current location and make this complex calculation, please?
I don’t see any change, only shorter distance travelled.
Thank you. :slight_smile:

1 Like

For the reasons given at the start of the lecture. The current location might not be exactly 100 units away and could even be noticeably further away than desired causing the end locations to drift.

Consider an extreme case, say DeltaTime is 2 due to a lag spike, the move distance is 100, and the velocity is 100.

Say in the previous frame the calculation of the new location put it at a distance of 90 so doesn’t change direction.
When it comes calculating the new location for the current frame it would be adding a distance of 200. Putting it at a total distance of 290 away. Far greater than the move distance.

Whereas calculating it as done in the lecture would be calculating where 100 units away from the start location should be.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms