1 (edited by ag82lus 2025-02-11 07:20:48)

Topic: Transform position is different

Hi,

we have added Online maps in our project which is 3D tileset and we are adding waypoints as 3D Markers on the map.
But we are facing one peculiar issue.

the latest new waypoint added on the map shows the transform on other location rather than where the waypoint is added.
and then after we add the second waypoint or move the point, the transform of the previous waypoint get automatically corrected to the original position where the marker is.

I have attached a screenshot showing where the marker was created and where the transform is being shown on the screen.

Any feedback or suggestions would be of great help.

Thank you.

Post's attachments

Attachment icon image.png 470.16 kb, 93 downloads since 2025-02-11 

Re: Transform position is different

Hi.

Please show your code.
I will check it.

Kind Regards,
Infinity Code Team.

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

Re: Transform position is different

private void OnMapClick()
    {
        control.GetCoords(out targetLng, out targetLat);
        GeoCoordinates coordinates = new GeoCoordinates(targetLat, targetLng);
        OnlineMapsMarker3D item = OnlineMapsMarker3DManager.CreateItem(coordinates.lon, coordinates.lat, obj);
        item.transform.localRotation = Quaternion.Euler(90, 0, 180);
        item.scale = 50;
    }

Re: Transform position is different

In your screenshot I see that the Transform Handle is in the sea (most likely it's the click location), and the cube highlighted in blue is behind the map.
This means that your cube has a non-zero position inside the prefab, and this is the reason why it is in the wrong place.

Kind Regards,
Infinity Code Team.

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

5 (edited by ag82lus 2025-02-12 11:40:20)

Re: Transform position is different

Hi Sir,

I have checked the prefab multiple times, the child objects are all placed at zero and actually its the other way round.
where we click on the map the cube is getting added over there, and the transform is shown in other place.
But when we zoom in/out map, or move the point the transform get corrected to the original position where the cube is.

I have a scenario, where I have to add a plus image on the midpoint between two points, as the transform is off the calculations for midpoint are not calculated correctly.

Re: Transform position is different

Unfortunately, I can't tell from your description and screenshot what's wrong.
If you want you can send me your project by email or via DM in discord and I will check it. Links in the asset description.
Other than that, unfortunately, I don't know how to help you.

Kind Regards,
Infinity Code Team.

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