Hello.
No matter how much time passes, prevPos and actualPos are equal and keeps saying that the object has stopped. How can I fix this issue? I’ve been dealing with this for 1 day.
You are checking the position value within the same Update and/or Function with no code between the prevPos and actualPos which would change the value, thus this will always be the same value.
one quick way of fixing this would be to assign prevPos at the verry end of the function. Then the next frame your prevPos would actually hold the value of the prev frame, while actualPos has already updated before doing your comparision. do note that prevPos would not yet be set on the verry first frame, might want to initialize it on awake or something.