The following is a simple snippet of swift code used in the init() of an extended SKScene to draw a straight line.
let path = CGMutablePath() path.move(to