The expressions you're using inside CGVectorMake()
are essentially a conversion from polar coordinates to cartesian.
The x component is given by radius * cos(theta)
, where theta is the angle in radians. y is radius * sin(theta)
. Zero angle generally points to the right ("due east").
Thus, just change theta to change the direction of your vector. (It's most sensible to pass the same number to both cosf()
and sinf()
, but of course you'll get some result no matter what you use.)