UberCarAnimation
UberCarAnimation copied to clipboard
Car oscillates a lot.
During animation car oscillates a lot. How to smooth that part?
Hey @anupdey99 thank you for noticing. I too noticed the behavior and try to resolve this. I am trying to setting a interpolator (not a linearInterpolator) and running animation more smoothly when there are turns or the car is more likely to oscillate. What is your opinion?
First of all, Thank you for your wonderful project. I think the method "private float getBearing(LatLng begin, LatLng end) " is the problem. It's calculating small Bearing degree that is not necessary for the animation. If we somehow smooth that angle curve, it will fix the problem. Let me know!
did you get solution for this issue. Please give the answer for this issue if you know the solution.
@lakmalz No sir, I am on it will update the code as soon as I will find the solution. Do try at your end also. Thanks :+1:
@anupdey99 calculating bearing is necessary for every pair of point because that will tell about the heading angle of the car and car will actually move at turns with angle. Without that you will see the car as straight and there will be no turning effects at the turn.
@anupdey99 thanks for solution.but in real time tracking marker animating on builds.how to show marker animation on road only
Has this been resolved?
Hey @vladdoster no, this has not been resolved. I am still working and trying to solve this. Will update the code as soon as I get a solution. Do try at your side also and feel free to suggest solutions here also :+1:
Thanks :]
Will look into this. Seems like a threshold value might help smooth it out. 👍
The same issue is happening, did anyone found the solution?
@amanjeetsingh150 @Moseqi I think I got the solution.
Hey @mobilegeekkk that's awesome. Can you suggest the solution for this and maybe raise a PR also? That'll be awesome 👍
@mobilegeekkk Hey I saw your PR. Appreciating your early response. It would be great if you change the base branch to dev for all of the PR's and maybe a little explanation that how you resolved the issue through a GIF or images would be awesome.
@amanjeetsingh150 I'll explain this after sometime. But It won't be possible for me to show a GIF or image. Sorry for that. I hope so that it would help you guys.
Hey @mobilegeekkk no problem, that works just an explanation would work for me before merging the PR. Thanks again 👍
@amanjeetsingh150 Hey Let me know if this can help you or not. Please look at this.

@anupdey99 @lakmalz @amanjeetsingh150 Don't animate marker and change bearing on every emit of latitude longitude. If there will be proper distance between two location then only animate. It will help you to sort out this issue.
Hey @amanjeetsingh150, Thanks for the wonderful project.
@amanjeetsingh150 Any update on this? I am also facing the same issue.