Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Car oscillates a lot. #4

Open
anupdey99 opened this issue Dec 17, 2017 · 19 comments
Open

Car oscillates a lot. #4

anupdey99 opened this issue Dec 17, 2017 · 19 comments

Comments

@anupdey99
Copy link

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

@amanjeetsingh150
Copy link
Owner

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?

@anupdey99
Copy link
Author

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!

@lakmalz
Copy link

lakmalz commented Feb 27, 2018

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

@amanjeetsingh150
Copy link
Owner

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

@amanjeetsingh150
Copy link
Owner

amanjeetsingh150 commented Feb 28, 2018

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

@mahesh517
Copy link

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

@vladdoster
Copy link

Has this been resolved?

@amanjeetsingh150
Copy link
Owner

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 👍

Thanks :]

@vladdoster
Copy link

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

@Moseqi
Copy link

Moseqi commented Jan 30, 2019

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

@praveenshharma
Copy link

@amanjeetsingh150 @Moseqi I think I got the solution.

@amanjeetsingh150
Copy link
Owner

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

@amanjeetsingh150
Copy link
Owner

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

@praveenshharma
Copy link

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

@amanjeetsingh150
Copy link
Owner

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

@praveenshharma
Copy link

praveenshharma commented Apr 17, 2019

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

ezgif com-crop

@deepbhavsar
Copy link

deepbhavsar commented Jun 14, 2019

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

@Shubham-vish
Copy link

Hey @amanjeetsingh150, Thanks for the wonderful project.

@devjava123
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants