Topic: Route Line Suggestion

Hello
Thanks for this Asset.
I have 2 question kindly help me.

1:- I was draw a route line like in your example automatic marker move at route line but i want to know how i can check user follow the rout line or not? if user not follow the route line then i will suggest other route which place user exist.How i can do.

2:- user marker not update smoothly if i was comment the automatic move code in update method.How i can smoothly move if user move in real world?

Please help me?

Re: Route Line Suggestion

Hello.

1. Use the Google Roads API to verify that the user is on the route.
Or, simply calculate the distance from the user's location to the nearest point on the active route segment (OnlineMapsUtils.NearestPointStrict, OnlineMapsUtils.DistanceBetweenPoints). If the distance is greater than a certain value (for example, 50 meters), the user has left the route.

2. Create a new user marker and Lerp coordinates from the marker location to the user's location.
http://infinity-code.com/atlas/online-m … ample.html
https://docs.unity3d.com/ScriptReferenc … .Lerp.html
https://docs.unity3d.com/ScriptReferenc … hDamp.html

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.