I have a unique Rotation issue (Top down/Twinstick)

I have a fully functioning Top Down Twin Stick control system. Nothing wrong there.
I can run, rotate, fire, etc. My system can even properly change control functions if you pickup a controller and play.

The issue!
Only when my character looks at an enemy does the aiming of the player jump left or right of the target.

  1. This only occurs during movement. (aim and fire functions properly if not moving)
  2. I implemented an aim assist feature when the cursor is over the target, This does not solve the issue.
  3. Aim assist works flawlessly when not moving, and does not work while aiming and moving.
  4. Using a controller everything functions properly.
  5. I am pretty sure ive tried every combination of hit detection settings to see if the cursor was interfering with the rotation. Regardless of whether or not the line of fire and cursor is in front of or behind the enemy does it jump to the left or right.

Imagine if you will that your character has a mind of its own and absolutely refuses to hit your target like its being repelled like a magnet.

Any Ideas?

I should imagine the BPs is pretty twisty for this.

I’m thinking you’re taking player position into account in the wrong way as somepoint, you have a ‘postitional leak’.

It’s a bit like if you try and sample the position of an object while trying to animate it with a timeline, the system can’t get a bead on anything because everything keeps changing. You end up with a very strange animation.

I know it makes sense that everything’s moving and everything should be sampled in real time, and it’s difficult to describe, but maybe I’ve jogged an idea out of the back of your mind…

I thought so too at first, however the issue only occurs when my AI target is present. If he is not near, the controls work as intended.

For anyone who needs to see the issue first hand let me know and ill give you a discord info so you can see it in action. Also I did get an idea that i wanna try… I did say try.

Tested an idea, and optimized at the same time, I removed any control method that utilized tick. I wanted to see if it was related to frame issues. This did not resolve the issue. On a good note. My control scheme now utilizes timers instead of tick.

So, what can AI have to do with changing aim calculations?

It should have nothing to do with it. However resolved half of the issue by directly fireing at the mouse cursor some distance off the surface. However I did further testing and come to the conclusion that using the controller produces the same result as the mouse, it was not as noticeable but after playing with the mouse and switching back to controller it was obvious that aiming at a character AI causes the direction of fire to jump around the actual target.

Strange…