Announcement

Collapse
No announcement yet.

Gun Sight Aligner

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

    #46
    Originally posted by PeaceSells_ View Post

    CalcSightsTransforms is in the gun bp, it needs to be in your gun bp (or your gun bp's parent class) and be called after the gun is attached to the character's hand. The Gun Sight Aligner's example character attaches the gun and calls its CalcSightsTransforms at EventBeginPlay. CalcSightsTransforms contains a ref to the hand bone - hand_r - and if your bone has a different name, you need to change the ref to match your own bone name, although I think the ALS character's hand bone name is also hand_r.
    Not sure whats wrong then, since I'm using the same example classes. I just parented the character under the als character, setup the anim bp and virtual bones, and the screenshot was the result..
    and yeah bone names are pretty much the standard.

    Comment


      #47
      thelazylion:

      Check if:

      1) ClacSightsTransforms is actually producing transforms: After attaching the gun to the hand, use a PrintString node to print the length and values of the SightTransforms array, which is filled by CalcSightsTranforms. Length of 0 means that CalcSightTransforms isn't working (or the gun has no tags or aimpoint sockets). Note: the Aim event of the product already includes a check to prevent trying to aim when this array is 0, but your character is already aiming in your pic, which tells me your array length isn't 0.

      2) The anim BP is actually receiving and using some value of this array: Use PrintString nodes in the anim BP to check the RelativeToHandLocation and RelativeToHandRotation values. They must be the same as the values in the SightTransforms array.
      Gun Sight Aligner

      Comment


        #48
        Originally posted by PeaceSells_ View Post
        thelazylion:

        Check if:

        1) ClacSightsTransforms is actually producing transforms: After attaching the gun to the hand, use a PrintString node to print the length and values of the SightTransforms array, which is filled by CalcSightsTranforms. Length of 0 means that CalcSightTransforms isn't working (or the gun has no tags or aimpoint sockets). Note: the Aim event of the product already includes a check to prevent trying to aim when this array is 0, but your character is already aiming in your pic, which tells me your array length isn't 0.

        2) The anim BP is actually receiving and using some value of this array: Use PrintString nodes in the anim BP to check the RelativeToHandLocation and RelativeToHandRotation values. They must be the same as the values in the SightTransforms array.
        thanks for the info, looks super useful. I'll get back to you with any updates..

        Thx again

        Comment


          #49
          Still happening., removing and re adding to project seemed to work with the default anim bp, even using the alsv4 skeleton/mesh. However I think due to a natural 2-3 degree offset in Alsv4's system, the aim is off by about a few degrees when ads'ing by default. This isn't too much of an issue. I'm just adding a 2-3 degree offset on any optical sight. Or maybe I'll just add a base offset at the end of the animbp..


          The issue is when the animbp is replaced with alsv4's animbp and everything is copy pasted over, including events, and references to the animbp are changed, the aim always just reverts to 0,0,0 on his head.

          Even though calc sight transform is printing a decent offset in the anim bp, i attached the calc sight on aim as well just to make sure, however still the same results as posted above.
          [Edit on the above]: Seems a macro didnt get copied over for the sight transform in animbp..


          Thanks again for the help..

          Another, quick (or possibly not) question while I move onto the next module of the project.
          If I want to set the mesh as the root, instead of the scene, what would be the correct process of doing this with the least amount of unnecessary overhead?

          Thanks again in advanced..


          Last edited by thelazylion; 10-17-2020, 11:47 PM.

          Comment


            #50
            Would it be possible to add a tutorial on how to integrate everything properly in ALS? It would be super helpful, thank you

            Comment


              #51
              Originally posted by thelazylion View Post
              If I want to set the mesh as the root, instead of the scene, what would be the correct process of doing this with the least amount of unnecessary overhead?
              In your gun bp, in the "Components" panel (the one on the top left corner where you see your components hierarchy), just drag the mesh on top of the DefaultSceneRoot, and it will become the root automatically.

              Now about your issue, it's been resolved if I understand correctly?
              Gun Sight Aligner

              Comment


                #52
                Originally posted by BelliniVirgil View Post
                Would it be possible to add a tutorial on how to integrate everything properly in ALS? It would be super helpful, thank you
                I need to try and integrate it with ALS on my end first, to see what issues might come up. When I have the time I'll try it and, depending of how it goes, I'll make a guide...
                Gun Sight Aligner

                Comment


                  #53
                  Originally posted by PeaceSells_ View Post

                  In your gun bp, in the "Components" panel (the one on the top left corner where you see your components hierarchy), just drag the mesh on top of the DefaultSceneRoot, and it will become the root automatically.

                  Now about your issue, it's been resolved if I understand correctly?
                  yes, it was a lot of work and to be honest I don't remember what I did exactly. But I had to add an offset to the calcsights transform in the anim bp to account for the als offset..


                  Pistols are perfect however rifles that use optic aim are still not centered perfectly. I will keep tinkering

                  Comment

                  Working...
                  X