Topic: Face 3D marker toward another coord

Hi,

If the 3d marker is at coord A, and i want it to face something at coord B...what's the best way to do that?

I've tried rotating the marker on Y axis by using the Angle2D utility from OnlineMaps:

onlinemapMarker3DInstance.transform.rotation = Quaternion.Euler(0, (float)OnlineMapsUtils.Angle2D(longitudeA,latitudeA,longitudeB,latitudeB), 0);

And it never seems to face the right way. I tried reversing the A and B coord parameters in Angle2D also.

Re: Face 3D marker toward another coord

Hello.

The simplest way is OnlineMapsMarkerBase.LookToCoordinates.
http://infinity-code.com/doxygen/online … a569db3a77

Kind Regards,
Infinity Code Team.

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

Re: Face 3D marker toward another coord

that's definately easier. I'm now trying:

            onlinemapMarker3DInstance.marker.LookToCoordinates(new Vector2((float)longitudeB, (float)latitudeB));

Now...the marker always faces away from coord B. (The marker prefab has Z forward).

Re: Face 3D marker toward another coord

Just wrap your marker into a new GameObject, rotate your marker 180 degrees, create a new prefab from the external GameObject, and use it for the markers.

Kind Regards,
Infinity Code Team.

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