1 (edited by digitalmkt 2020-07-01 22:20:40)

Topic: DrawLine texture doesn't fit

Hi Alex, How are you doing?

I jump into this problem today. I'm using the code below to draw a texturized line on my map connecting 2 points. I've tried to adjust it by using UV settings with no success. Looks like the line is drawn with many small pieces of meshes with different textures UV mapping coordinates. Also, tried all forms of texture wrapMode and materials.

Any math to solve this?

        line = new OnlineMapsDrawingLine(points);
        line.texture = lineTexture;
        line.width = 8.0f;
        line.texture.wrapModeW = TextureWrapMode.Clamp;
        OnlineMapsDrawingElementManager.AddItem(line);

It's supposed to look like a black dotted line...

PunBB bbcode test
PunBB bbcode test
PunBB bbcode test
PunBB bbcode test

Thank You.

Re: DrawLine texture doesn't fit

Hello.

The Drawing API is not suitable for this.
To draw a dotted line it is better to use LineRenderer or this example:
http://infinity-code.com/atlas/online-m … ample.html

Kind Regards,
Infinity Code Team.

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