1 (edited by kononchuk_m 2020-02-16 23:21:12)

Topic: Map dragging problem

I have problem with dragging online map while using UI components for displaying map (video attached)
I tried to display map as Raw Image and Image components but none of them worked correctly. (in each case I use proper control component)
I tried to off "Render in thread" and set size of UI elements to N * 256, that didn`t help me. Maybe you can help and explain correct settings for rendering map on UI elements?
Also I tried display it with sprite renderer and in this case it works fine
https://drive.google.com/open?id=1nK7fk … E0Xs9h0lmN

Re: Map dragging problem

Hello.

What version of Online Maps are you using?
This bug has been fixed in Online Maps v3.6.3 (available through the built-in update system).
I checked on the latest version of the asset, and this bug does not occur.
So just update Online Maps through the built-in update system.

Kind Regards,
Infinity Code Team.

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

Re: Map dragging problem

I update version to v3.6.4.1 and nothing change. Maybe exist some  special way to setup UI controler?

Re: Map dragging problem

No, it does not require any special configuration.
Here is a video about creating a UI Image map in an empty scene:
https://www.dropbox.com/s/u1589jfzge614 … 2.mp4?dl=0

Kind Regards,
Infinity Code Team.

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

Re: Map dragging problem

Thanks, now it working better.
But I still have one problem with map stucking while drag. Sometimes when you drag map it got stucking for no reason

Re: Map dragging problem

Honestly, I do not know how to comment on this.
I tested more, and did not see this problem at all in the latest version of the asset.
If you have ideas on how to reproduce the problem, I will try to do it.

Kind Regards,
Infinity Code Team.

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

Re: Map dragging problem

Sorry, maybe I didn't make it clear, now I attached video for you
For my implementation, I needed my UI to be tilted 30 degrees. And than I noticed that the map got stuck when dragging it. I don't now if it's some bug or it's normal state of working with UI components in Unity, but I glad that now it working. Thank you for help!
Link removed

Re: Map dragging problem

Thank you for the video.
I was able to reproduce this bug.
I don’t know what is the point of rotating UI element along X axis, but this is definitely a bug, and we will fix it.
I think the fix will take 1-3 days.

P.S. I removed the link to your video, because it contains your invoice number.

Kind Regards,
Infinity Code Team.

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

Re: Map dragging problem

It was difficult, but I found the problem - this is a bug in Unity UI.

This is a bit hard to explain, but I will try:
When you rotate Image along the X axis, all points on the Y axis have different distances from the camera.
When the distance to the camera is greater than the distance to Canvas + some value, some Unity APIs (for example, RectTransformUtility.ScreenPointToLocalPointInRectangle) stop working correctly.
Most likely this method makes raycast with a distance limit that is less than the bottom of the map.

I fixed the jumps when entering this area.
Updated script attached.

But there is another problem:
This area will ignore any interaction due to the bug above.
To work around this, increase the Z position for Image GameObject.

Post's attachments

Attachment icon OnlineMapsControlBaseUI.cs 5.92 kb, 190 downloads since 2020-02-19 

Kind Regards,
Infinity Code Team.

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

Re: Map dragging problem

Thanks a lot, I'll try!