I've been trying to get sprites to stay on a set point on another rotating sprite. At the moment, it's very inaccurate, the original position is wrong, and when the rotation is applied the sprite drifts away from the point its intended to stay in. The code I'm currently using is as follows, and I'm pretty sure there's something wrong with it, I just don't know what it is.
rad = sqrt((x-originx)^2 + (y-originy)^2)
x = originx + cos(cameraangle+asin(x-originx)) * rad)
y = originy + (sin(cameraangle+acos(y-originy)) * rad)