Please bear with me if I use any incorrect terminology. Iām a 41 year old guy trying to teach myself. Thank you!
When I did Challenge 3 in Chapter 2, I used the following in the rotate function:
let shortest = shortestAngleBetween(angle1: sprite.zRotation, angle2: direction.angle)
The solution provided used this:
let shortest = shortestAngleBetween(angle1: sprite.zRotation, angle2: velocity.angle)
Everything else I coded was the same and both worked the same. So my question is:
Why did the solution use velocity.angle instead of direction.angle?