Announcement

Collapse
No announcement yet.

How to make a "Third person character's" arm point in the direction of the camera?

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

    How to make a "Third person character's" arm point in the direction of the camera?

    Hey all,

    So I'm using a Third Person character setup to create a full body First Person perspective. IE I started with a Third Person Character and then attached the camera to the Head bone of the skeleton.

    I've got a Flashlight setup in my anim blueprint using an animation montage for "Draw, Idle and Holster" connected to my character bp so when the player hits the L key, the flash light draws then turns on. This looks great but the problem is the light is always shining straight forward regardless of which direction the player looks. I tried parenting the spot light component to the camera but it just doesn't look right because it's obvious that it's not emanating from the flashlight in the characters hand. Is there a simple(ish) way to have the character's arm point in the direction the camera is facing so I can get the best of both worlds here? I'm guessing the answer might be using an blend space but I've only ever set up a 1D Blendspace so I'm not really sure how those work. Is there another way to do this or is the blend space my best option?

    Here's a screenshot of my setup:



    Incase you're wondering why the character's face is blurred out, it's a secret for my game so I don't want an image of his face to exist anywhere on the internet.
    Last edited by TorQueMoD; 07-08-2017, 03:56 AM.
    -TorQueMoD
    www.torquemod.com

    #2
    So I found a tutorial on how to use "Transform (Modify) Bone and add some rotation to the arm to match the camera's direction. Unfortunately it's not quite working properly as everything is off by 45 degrees so when you look at the ground, the arm is forward, when you look forward it's up 45 and when you look up it's almost behind you. Any idea how to fix this?

    Here's my event graph:
    -TorQueMoD
    www.torquemod.com

    Comment


      #3
      Anyone have any ideas as to why the rotation of the arm is off and how to fix it?
      -TorQueMoD
      www.torquemod.com

      Comment


        #4
        what is the purpose of the /2 node? What happens if you disconnect it? and what happens if subtract or add 90 to X instead of dividing by 2?

        Comment


          #5
          The divide by 2 node was there simply because I was following a tutorial and that's what he did. To be honest I'm not sure if it's helpful in my setup because I'm trying to rotate the arm not the head (as in the tutorial). If it's off by 45 degrees, why would I add or subtract 90? Or is that just to get an exaggerated result for testing?
          -TorQueMoD
          www.torquemod.com

          Comment


            #6
            If you divide by 2 it could be that your arm is actually 90 degrees off. Subtracting 90 or adding 90 could potentially be a fix for that depending on the original rotation. Working off the thirdperson template, in my setup I have both subtracting 90 and adding 90 to roll and yaw to make it face my camera direction correctly

            Comment


              #7
              Ok cool. Thanks for that. I'm just working on another area of the game at the moment but I'll try getting rid of the divide and using the add and subtract to see if that works better and post the results when I've finished.
              -TorQueMoD
              www.torquemod.com

              Comment

              Working...
              X