For one of my classes I made a javascript game that involve characters that jump to random parts of the screen. I am trying to convert this game to Swift (I am very bad at coding and this is my third day working with Swift).
I got the part where the characters (SKSpriteNode) bounce around the screen. But for some reason I have really struggled with drawing the lines. I tried using UIBezierPath() & CAShapeLayer(). I also tried an SKSpriteNode.
But I haven't been able to draw a line at the proper angle between the original point and the ending point of the characters. Because the characters move to random spots the angle changes all the time and the size of the line also needs to change.
Here's a picture of the Javascript game: