Announcement

Collapse
No announcement yet.

Rotate Player mesh to mouse position

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Rotate Player mesh to mouse position

    Hi all,

    I need to rotate the pawn mesh to the mouse position on screen.
    Here is what I have so far.

    Click image for larger version

Name:	rotToCam.JPG
Views:	1
Size:	103.1 KB
ID:	1147753

    However, when I move using WASD, the mesh's rotates opposite to the pawn's direction. It's blue arrow looks like a tail.
    This makes aiming really hard to do.
    Click image for larger version

Name:	afasdf.JPG
Views:	1
Size:	74.7 KB
ID:	1147754

    Any help would be greatly appreciated.

    Thank you.
    Check out my itch.io page, I'm really excited about it.
    https://kinos141.itch.io/

    Please check out my AI package: Action AI System Feat. Stealth
    https://www.unrealengine.com/marketp...m-feat-stealth
    or get it from itch
    https://kinos141.itch.io/action-ai-system-feat-stealth

    #2
    Look at my top/down fps template
    Website [ LINK ]
    Twitter [ LINK ]
    Support ! [ LINK ]

    Comment


      #3
      Thank you for the help.
      Your project works very well, however, I wonder how it works on a 3/4 top down view.

      I modded it and noticed that the actor didn't move relative to camera position, I have that same problem.
      Do you know any solution to that?

      Thanks
      Check out my itch.io page, I'm really excited about it.
      https://kinos141.itch.io/

      Please check out my AI package: Action AI System Feat. Stealth
      https://www.unrealengine.com/marketp...m-feat-stealth
      or get it from itch
      https://kinos141.itch.io/action-ai-system-feat-stealth

      Comment


        #4
        In cases like this I always use TraceLine node for visualization of how my vectors really look like.
        So add traceline by channel there to show that start and target points.

        You also could use trace line to find exactly what is under mouse and look at that point.

        Ps. for better finding out how those debug trace lines look set them to permanent, make few traces then eject and see from spectator perspective.

        Comment


          #5
          Hey, thanks to you guys.

          I figured out that the Spring arm was the issue. Once I positioned it properly then it started working.
          Thanks again, guys!!

          Now, on to the hard parts.
          Check out my itch.io page, I'm really excited about it.
          https://kinos141.itch.io/

          Please check out my AI package: Action AI System Feat. Stealth
          https://www.unrealengine.com/marketp...m-feat-stealth
          or get it from itch
          https://kinos141.itch.io/action-ai-system-feat-stealth

          Comment

          Working...
          X