Question by
HenBOMB · Apr 08, 2018 at 12:13 AM ·
script.solutionvector3.movetowards
Remove end slowdown from Vector3.MoveTowards();
While using Vector3.MoveTowards() my object slows down when it gets near then end of the transition for some reason. Is there a way to remove this or a way around it?
Vector3 newPos = Vector3.MoveTowards(transform.position,target.position, moveSpeed * Time.deltaTime);
newPos.y = transform.position.y;//constrain the y axis
transform.position = newPos;//set the new pos
Comment