Orthographic Camera Turn-In-Place Animation Problems

Isometric Shooter Game Turn Animations Problems

I’m developing an isometric shooter game, and I’m struggling with the turn animations. I’ve spent five days on this and feel close to a solution, yet something is still missing.

  • Issue: The animations work technically but are extremely buggy and value causing for it decide left or right switches signs.

Perhaps elaborate what the issue is. Can’t tell whether you’re having issues with rotating the camera or turning the character.

yes my bad i thought i posted my bps

BP_MainCharacter

ABP_Main

Desired outcome when mouse moving clockwise value goes negative and stays negative until the mouse stops and vice versa

1 Like

Try it like so:


To clarify: this would find whether the cursor is on the player’s left / right hand side taking their orientation into account. However, if all you want is to smoothly interpolate player rotation towards the cursor, there are other ways.

yeah my goal is just for the player while still to do a loop of the animation corresponding to which direction its being rotated. Also could you clarify where that would go in my system or should i just start from scratch?

In this case, let’s try a slightly different approach:

You can copy the script from:

And paste into the graph - just to quickly see if you like it. Do change the Control Rotation settings - the bit in red.

how would i go about using this value to trigger my animations corresponding to which way im rotating

So you do need -1 / 1 after all? You could add the script mentioned previously to the above.

1 Like

okay im going to sound like a noob (proabably because i am) but where should i stick these together and what do i do with the control rotation and how does the control rotaion differ from one stored in a rotator also thank you for the help thus far ive been on this for 6 days now

im still pretty confused whenever i tried to put it together the rotation value stayed the same and there isnt room for it to transition to idle

Check if Z Nearly Equals 0 - the tolerance will be the idle state.


Wrapped in functions so we do not need to calculate intersection twice and it’s a tad cleaner:

Hope that’s close enough to address the original issue. If the left / right / idle state is only needed in the animation BP, consider scripting it there instead.

i Have exactly what you have but my it still switches mid turn it also never goes to idle either also when the mouse goes over the player it doesnt rotate behind the player

Are you running your own script as well? That will clash.

no this is my only script running i disconnected my animation bp and my cursor set mode to ui and game in my gamemode bp so im very confused as to what is happening

In the 2nd screenshot, you’re setting character rotation, after Tick. Or is it disconnected while you test?

yeah i tried disabling that but it just sticks my character in place and prints idle

Here. On mobile now, couldn’t see it. My bad.

okay that does work but what should i do so it doesnt stop when moving the mouse slow because it the value stutters when moving the mouse slow and thank you so much for your help youve been really helpfull

rInterpTo Control Rotation before setting it.

do i put the look at rotation in the current and set the target to zero and what should i set my interp time to as well also it doesnt go into idle if i set the interp time