I’m trying to make a path rotate spin clockwise in the center of the screen. but the axes used by the rotate function is centered on the top left of the screen. currently my solution is this
mainPath.translate(ofVec2f(-1*center.x,-1*center.y));//center is just a vector containing the center coords
is there a different way of doing this without moving the path to 0,0. preferably changing where 0,0 is located?
if the path is used always like this I would suggest you have the (0, 0) point in the center of your path.
to do this you use this on setup once
in update just this one
and you can use
hi, you can do that or use ofRotate and ofTranslate which is more or less the same but it will not actuallty move the points of the path but rather rotate the whole scene in open GL, which is way much more eficient.