I want an actor to be able to reference specific points within its image; i.e., front, back, sides. The problem is that the actor is able to rotate, so I can't just create a permanent offset from the actor's center. I need to be able to calculate the x and y distances that the reference point is offset from the actor's center as it rotates. I need to essentially create a fixed point on the actor without moving that point by rotating the actor.
My process so far has been trying to convert a rotation into x and y integers that form a triangle with the given angle, without exceeding the height/width of the actor
With trig, I can use an x and y offset to create a rotation, but I need to essentially reverse that process. I need to get an x and y position from a given angle of rotation, but am unsure as to how I can do that.
I can't use getNeighbors(), or getObjectsAtOffset(), or similar methods that find an object offset from the actor because the actor is finding different color patterns in the world, as opposed to finding different objects.
Any suggestions are appreciated