Reputation: 70
Is it possible to rotate an image around a specific point, rather than the center? I see options for RVG's, but not for Magick::Image's :/
http://www.simplesystems.org/RMagick/doc/rvgxform.html#rotate <- RVG pivot point
Upvotes: 1
Views: 416
Reputation: 737
angle -= angleSpeed * delta;
image.x = target.x + sin(angle) * distanceFromTarget;
image.y = target.y + cos(angle) * distanceFromTarget;
Upvotes: 1
Reputation: 6105
you could try changing the anchor point of the image to where you want it to rotate around, instead of the center
Upvotes: 0