please bear with me
I'm not a programmer, and my math is pretty much zero at best
I'm creating this mech shooter platformer,
and I encountered some trouble with the gun aiming in my game
it's not really a big problem really, but the curiosity is eating me
so I created a gun, where the origin of the sprite is at the bottom,
and an image point for spawning the bullet.
I have created an action to set the angle to point to mouse position,
so it looks like this:
now, it is working as it should,
but there's a bit problem with the accuracy this way, the gun won't shoot exactly where the pointer at.
So what I need is for the sprite to point from the image point, but still rotate on its origin
so I figured i would need to point the angles toward this position instead:
is there some way I can retrieve this position using equation?
or can this be achieved in some other way instead?