1 (edited by taylorbrown2686 2020-06-16 16:01:19)

Topic: 3D Marker Spawning Offset from Map

Hey Infinity Code Forums,

I recently got the Online Maps V3 plugin, and am loving it so far. I have just ran into one issue, it is regarding 3D markers. If you look at the attached screenshot, the blue capsule is supposed to represent the center of the map (that's the geoposition it is set to, 44, -91). The map is slightly offset and attached to the player camera, it's position is (0, -4, 11).

I run into issues when the blue capsule spawns, it assumes that the map object is at the origin, and spawns the capsule relative to that (which behaves the same if I pan the map around, it just moves in empty space and despawns when it hits the bounds of the map). I need the capsule to recognize the map plane has moved, and adjust to that position instead. 2D markers work fine, which is why I am confused as to why 3D are giving me issues.

I tried wrapping the 3D markers in another object and applying the offset to that object, but that didn't work. I assume there is an easier way. If any of you have solutions to this problem, please let me know. Thank you guys!

Post's attachments

Attachment icon error.png 540.41 kb, 51 downloads since 2020-06-16 

Re: 3D Marker Spawning Offset from Map

Hello.

Most likely there is a problem with your prefab.
Please send me your prefab as a package and I will check it and tell you how to fix it.

Kind Regards,
Infinity Code Team.

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

Re: 3D Marker Spawning Offset from Map

Hello, and thank you for the reply.

I would send you the prefab, but I feel like that is unnecessary. The prefab is literally a primitive capsule in Unity, no additive scripts or components. You could get the same prefab by simply creating a capsule and making it a prefab. For some reason, the positioning script assumes my map is at the origin, but it isn't. I know this because if I move the map to 0,0,0 and pan around, the capsule is in the correct location. When the offset is applied though (the map is at 0,-4,11), the capsule appears off.

Re: 3D Marker Spawning Offset from Map

Here is the video with capsule prefab:
https://www.dropbox.com/s/awcnxnwxgnnht … 4.mp4?dl=0
For the map, it does not matter what position it has in the scene.

Kind Regards,
Infinity Code Team.

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

Re: 3D Marker Spawning Offset from Map

Interesting, comparing the values from your video to my own, it still has the same behavior even though they match. Can you think of anything else that would cause it to spawn off of the map?

Re: 3D Marker Spawning Offset from Map

This usually happens when your prefab contains two GameObjects (external and internal), and the internal GameObject has not zero position.

Kind Regards,
Infinity Code Team.

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

7 (edited by taylorbrown2686 2020-06-16 21:42:21)

Re: 3D Marker Spawning Offset from Map

If you need more information, I will provide some. The 2D markers work fine, as intended. I tried using something other than a capsule, everything I use does the same behavior. I have no script editing the position of this object at runtime, it is a basic Unity Primitive. The map object is a child of a child, so third level child. The parents of the map though are all placed at 0,0,0, could this be causing the error?

EDIT: The above question was not my issue, as i tested it, and the prefab has no other objects than the capsule. The capsule is also at 0,0,0 by default. The prefab is as simple as any primitive object. There is absolutely nothing going on with it other than Unity's default behaviors.

Re: 3D Marker Spawning Offset from Map

Nope.
Please make a short video to show the structure of your scene (map and parents) and the structure of these prefabs.

Kind Regards,
Infinity Code Team.

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

9 (edited by taylorbrown2686 2020-06-16 21:57:06)

Re: 3D Marker Spawning Offset from Map

Here is the video, complete with the prefab information, map information, and scene heirarchy.

EDIT: The video is too big to upload, I will have to upload it on YouTube and send you that link instead. It may take a while, even though the video is only 1m27s

EDIT 2: https://youtu.be/LMjLQuNroJw

Re: 3D Marker Spawning Offset from Map

Why does the map have components in edit mode: Mesh Filter, Mesh Renderer and Mesh Collider?
These components are added to play mode, and you should have exceptions because you already have this.
Maybe this is your problem ?!
Try removing these components.

Kind Regards,
Infinity Code Team.

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

Re: 3D Marker Spawning Offset from Map

I have no exceptions for having those components on the object, removing them also doesn't solve the issue. Any other recommendations?

Re: 3D Marker Spawning Offset from Map

Very strange.
You must have these exceptions. Tested.

Please send your project to me by email (support@infinity-code.com) for testing.
To make it clear:
I do not need your working project.
I need any temporary project where this problem will appears.

Kind Regards,
Infinity Code Team.

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

Re: 3D Marker Spawning Offset from Map

Sent you the email with the project zip