unitycoder / UnityMobilePaint

Public repository for MobilePaint issues & requests
https://www.assetstore.unity3d.com/en/#!/content/19803?aid=1101lGti
MIT License
51 stars 16 forks source link

Minimum brush size is still thick. #43

Open BelieveXiaoShuai opened 4 years ago

BelieveXiaoShuai commented 4 years ago

Current minimum brush size is 1. I still think of this size is thick. Is there any other way to adjust the brush thickness?

unitycoder commented 4 years ago

there is bug that the 1px brush is actually drawn as 3 pixels image

because its using the DrawCircle method, which doesnt really work with small size https://github.com/unitycoder/UnityMobilePaint/blob/master/Assets/MobilePaint/Scripts/MobilePaint.cs#L957

workaround: inside void MousePaint() or void TouchPaint(), where it checks for drawmode switch (drawMode), add code to check if brushSize ==1, then draw single pixel only. (and dont call DrawCircle) call public void DrawPoint(int x, int y)

BelieveXiaoShuai commented 4 years ago

It doesn't seem to work.

BelieveXiaoShuai commented 4 years ago

image

BelieveXiaoShuai commented 4 years ago

The little point is one pixel and another three is 2/3/4 pixels image

unitycoder commented 4 years ago

is that zoomed in? or looks like the resolution is quite low, test with overrideResolution to some bigger value than 1?

BelieveXiaoShuai commented 4 years ago

No, just a screenshot.

unitycoder commented 4 years ago

ok, try disabling [x] connect brush strokes, it tries to connect strokes and seems to draw extra pixels there.

or try adding some fix like, check for same position: image

BelieveXiaoShuai commented 4 years ago

It works, Thank you!