Top down rotate only when not moving?

Need some help with my top down template.

I want my pawn rotating with turning animations to face the direction of the mouse pointer when he is standing still.

Using this tutorial I got the pawn to rotate with the mouse, but he do it all the time also when moving:

So I tried to adding a branch and using the pawn velocity to control the rotation.

But it’s not working correctly. It keeps changing randomly to true and activating the pawn rotation branch, when you point and click around the map.

A little video showing the problem:

Anyone know whats wrong?

Also highly appreciated, if anyone could tell me how I can add animation to the rotation, I’ve not been able to find any help on this.

Still need some help with this…

You move your character like in this tutorial right? not by point and click with mouse?
It’s great tutorial series about basic topdow, Thanks to Weaver for that! But i think it’s not you want at all.
Try to implement point and click movement and check face to movement rotation.

You know you set your control rotation to 0,0,0 right? Was that what you intended?

No movement is point and click and just like in the default Top down template, only added the rotation part from Weaver’s tutorial.

I wan’t the pawn to rotate/look at the mouse pointer, but only when he is idle and not moving to a point. The goal is the pawn turns his head when the mouse moves in front of him, but when you move the mouse pointer behind the pawn he will turn and always focus on the object you want him to interact with or walk to…

But not sure how to do this correctly or if it will even work, just thought it would be neat…

beanswaggle No, that was left over code and have been removed…

So do not rotate character when his velocity length is greater than 10 let’s say.

To turn his head you have to use AimOffset - read documentation, there is great example.
To solve the second part you have to be pore precise. If you want to turn only characters head when mouse cursor is in front of him (-90 to 90 degrees) an if a cursor is behind him to turn full body right? What in situation when while turning to cursor location this location will be a -90 degrees prom actor’s front? He will stop rotationg and will use aim offset.

Think i found the problem why it seemed my pawn rotation only to worked randomly…

I have not added the Y axis in the branch, so it only works moving down the X axis on the map.
But how do I feed the branch with both X and Y from the “Player velocity convert to true/false” comment box in the screenshot above?

XaresX84
I’ve made AimOffset before on a FPS project, but the blueprint is different on a point and click game. I don’t even know how I calculate the position of the cursor yet, so it can be used in the AnimBP and AimOffset…