UberCarAnimation icon indicating copy to clipboard operation
UberCarAnimation copied to clipboard

Car oscillates a lot.

Open anupdey99 opened this issue 7 years ago • 19 comments

During animation car oscillates a lot. How to smooth that part?

anupdey99 avatar Dec 17 '17 04:12 anupdey99

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?

amanjeetsingh150 avatar Dec 20 '17 13:12 amanjeetsingh150

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!

anupdey99 avatar Dec 20 '17 15:12 anupdey99

did you get solution for this issue. Please give the answer for this issue if you know the solution.

lakmalz avatar Feb 27 '18 19:02 lakmalz

@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:

amanjeetsingh150 avatar Feb 28 '18 16:02 amanjeetsingh150

@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.

amanjeetsingh150 avatar Feb 28 '18 16:02 amanjeetsingh150

@anupdey99 thanks for solution.but in real time tracking marker animating on builds.how to show marker animation on road only

mahesh517 avatar Jun 08 '18 06:06 mahesh517

Has this been resolved?

vladdoster avatar Sep 13 '18 15:09 vladdoster

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 :]

amanjeetsingh150 avatar Sep 13 '18 15:09 amanjeetsingh150

Will look into this. Seems like a threshold value might help smooth it out. 👍

vladdoster avatar Sep 13 '18 18:09 vladdoster

The same issue is happening, did anyone found the solution?

Moseqi avatar Jan 30 '19 08:01 Moseqi

@amanjeetsingh150 @Moseqi I think I got the solution.

praveenshharma avatar Apr 16 '19 18:04 praveenshharma

Hey @mobilegeekkk that's awesome. Can you suggest the solution for this and maybe raise a PR also? That'll be awesome 👍

amanjeetsingh150 avatar Apr 16 '19 19:04 amanjeetsingh150

@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 avatar Apr 16 '19 20:04 amanjeetsingh150

@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.

praveenshharma avatar Apr 16 '19 21:04 praveenshharma

Hey @mobilegeekkk no problem, that works just an explanation would work for me before merging the PR. Thanks again 👍

amanjeetsingh150 avatar Apr 16 '19 21:04 amanjeetsingh150

@amanjeetsingh150 Hey Let me know if this can help you or not. Please look at this.

ezgif com-crop

praveenshharma avatar Apr 17 '19 07:04 praveenshharma

@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.

deepbhavsar avatar Jun 14 '19 12:06 deepbhavsar

Hey @amanjeetsingh150, Thanks for the wonderful project.

Shubham-vish avatar Oct 14 '19 16:10 Shubham-vish

@amanjeetsingh150 Any update on this? I am also facing the same issue.

devjava123 avatar Dec 17 '19 12:12 devjava123