I have created a line but I'm not able to increase the thickness of it.
Is there something with firstMaterial
that I can use to increase the thickness of my line?
Here you are my functions:
func getDrawnLineFrom(pos1: SCNVector3, toPos2: SCNVector3) -> SCNNode {
let line = lineFrom(vector: pos1, toVector: toPos2)
let lineInBetween1 = SCNNode(geometry: line)
line.firstMaterial?.diffuse.contents = UIColor.blue
return lineInBetween1
}
func lineFrom(vector vector1: SCNVector3, toVector vector2: SCNVector3) -> SCNGeometry{
let indices: [Int32] = [0, 1]
let source = SCNGeometrySource(vertices: [vector1, vector2])
let element = SCNGeometryElement(indices: indices, primitiveType: .line)
return SCNGeometry(sources: [source], elements: [element])
}