Rotating battle animations

I'm a bit stumped with a script I'm working on.

In my battle system I'm using actor battlers in side view. I need to find a way to rotate the battle animations to make it appear they are coming from the correct actor instead of just being flat. It's a bit hard to explain so I have a video.



You can see that when the enemy in the bottom left fires at the actor in the top right the gun fire looks like it's coming from no where, I need a way of taking the coords of the subject and the target and figuring out from that how to rotate the animation.

Please help, it's driving me mad trying to fix this myself.
I've moved this thread to RGSSx Script Support (since you're after help with your script and not after someone to write a script for you). Please be sure to post your threads in the correct forum next time. Thank you.


Have you looked at some of the battle scripts out there that already do this, to see how they accomplish it?
simply do this 

def [email hidden] += #number#endnaturally this how you settle for make a angle for any kind of sprite

but think about the fact this will be not efficient due...angle require data update and will provoke jitter to your animation

so example if you do animation move + angle you surely obtain a even more bad result then just doing a rotative animation 

Original thread: https://forums.rpgmakerweb.com/threads/rotating-battle-animations.37358/