So I’m making a tool where you can draw on every surface you want (spheres, normal parts, wedges, etc). I came across that when I draw, if my cursor is too fast, I would have dotted lines:
I fixed it by making a part that fills those gaps:
Now when I wanna draw on other angles this happens:
Another example:
.
The lines don’t correspond to the angle that its been drawn to.
Here’s a piece of my code:
local brushRay = brushRaycastModule.raycast(ignoreList)
if brushRay then
brush.Parent = personalPaintFolder
local normal = brushRay.Normal
brush.CFrame = CFrame.new(brushRay.Position, brushRay.Position + normal)
if mouseDown then
local point0 = brush:Clone()
point0.Anchored = true
point0.BrushGUI.AlwaysOnTop = false
point0.BrushGUI.LightInfluence = 1
point0.Parent = clientPaintFolder
if point1 then
local pos0 = point1.Position
local pos1 = point0.Position
local distance = (pos0 - pos1).Magnitude
local cf = CFrame.lookAt(pos0, pos1) * CFrame.Angles(0, math.pi / 2, 0) * CFrame.new(distance / 2, 0, 0)
local partC = Instance.new("Part")
partC.Anchored = true
partC.Size = Vector3.new(distance, 0.068, 0.25)
partC.CFrame = cf
partC.Color = Color3.fromRGB(255,0,0)
partC.Parent = clientPaintFolder
end
point1 = point0
end
else
point1 = nil
brush.Parent = replicatedStorage
end