Hi, I am trying to do a top down shooter with one of the paragon character (Lt. Belica) as player character. I want the character to rotate automatically and always look towards the mouse cursor. However, the character’s rotation is always off by 90 degrees (see screenshot, red circle is approx. mouse position). I had to rotate the character mesh by 90 degrees to face the blue arrow, I bet this is causing some of the trouble. But also if I reset the mesh rotation, the problem remains. If I manually add 90 to the rotation computation it works, but there has to be a better solution.
Hey, @Steffen Just looking at your meshes, is there something going on with the animations
Your topdown view during runtime has the character looking over the gun but the blueprint has the character looking to the right of the gun
Maybe check your animations and see if they are rotated
Yes, the character is animated and moves its head (idle animation), you can ignore that. You can look at the left (front) foot as indication to where the character is currently facing.
Is there a way to tell Unreal, to ignore the -90 degree rotation in its computation and treat it as no rotation? That would make the logic much easier.
Ok as expected, I now ran into prooblems with my workaround. I will try to reformulate my question, maybe it is clearer that way.
When I import Lt. Belica and open her blueprint, she is facing the wrong way (downwards in the picture, which is not the direction of the (light) blue arrow (i.e. the forward direction)
Now, when I rotate her mesh by -90° along the z-axis(yaw), she does look to the right (which is forward) but when I run the game, she still looks the wrong way. I want her to look at the mouse position (red circle).
My question now is: how can I make her look at the mouse given the following blueprint?
This sequence is basically identical to the C++ logic for the turret rotation in the Toon Tanks course.
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.