I am working on a problem where distance between the point A and B or given and object of interest should move smoothly from A to B.
I can control only control the speed of the object using this object should start slowly from point ease in and ease out at point B and need to exactly land on point B
I tried implementing ease in speed using distance covered however, at the beginning distance covered will be zero there will be starting problem. I solved starting problem using time elapsed as reference however this will not work precisely stoping object at point B, so I used distance remaining as a key to ease out.
This works for larger distance for smaller distance yet to tweak the code . Overall implementation messy not satisfied. Is there any generic solution to solve this problem? Note speed just a parameter controls overall movement of object, I can't say there is a exact relationship speed and distance covered.
(Unity developers: Note I am trying to control the movement of the character using three animation idle:speed=0, slowwalk:average speed=1, fastwalk: average speed=2)