I'm trying to implement a simple radial aiming mechanic using gamepad controls. So far, I have this working, where the position of the aiming sprite is set to the player's centre, as if the character was holding/aiming the weapon by their side. However, my intention is to have the aiming sprite offset so that can orbit the player by a set distance (i.e. like a 360 degree floating turret).
I thought I could achieve this by messing around with ImagePoints, but this doesn't seem to work as intended (the angle of the sprite does not line up with the position of the analogue stick). Can anyone suggest a particular approach here? I feel like it should be relatively simple, but I'm missing something obvious.
A secondary issue I have is that the aim angle springs back to the original position, understandably, as the analogue stick is disengaged. How would I be able to leave the position of the aiming sprite in the last position that the player aimed in? Would I need to report the last set position to a variable and then set the angle to that when the stick isn't in use, or again, is there a simpler method that I'm missing?
Thanks for any help you can provide!