Announcement

Collapse
No announcement yet.

Gun Sight Aligner

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

    #16
    Hey, just do this change in the anim blueprint (AB_ExampleCharacter). Delete the FlipFlop and add another custom event (ExitAim), wired like shown below:

    Click image for larger version

Name:	AimAnimBlueprint.JPG
Views:	255
Size:	170.6 KB
ID:	1690465

    Then do this change in the character blueprint (B_ExampleCharacter):

    Click image for larger version

Name:	AimCharacter.JPG
Views:	243
Size:	327.4 KB
ID:	1690466


    Please let me know if you encounter any problems...
    My Marketplace assets:

    FPS Assemblable Gun

    Gun Sight Aligner

    Comment


      #17
      Updated to v1.1.1

      Change log:

      - Small change in the method of calculation of ironsights. It now uses the node FindLookAtRotation followed by roll adjustment, instead of the dot products, RotationFromAxisAndAngle and CombineRotators nodes to find the direction from rear sight to front sight. The new method works better with the change implemented in v1.1.0 (since v1.1.0, the old method would let the rear sight a bit off depending on its location on the gun in relation to the front sight)

      - Corrected code comments that were outdated since v1.1.0

      - Updated to Unreal Engine v4.24
      Last edited by PeaceSells_; 01-10-2020, 07:53 PM.
      My Marketplace assets:

      FPS Assemblable Gun

      Gun Sight Aligner

      Comment


        #18
        Updated to v1.1.2

        Change log:

        - Fixed: lack of smoothness when cycling between sights while aiming. Before, the interpolations were done through a Timeline in the character and the resulting values were applied in the EventBlueprintUpdateAnimation of the anim bp. Now everything is done in the anim bp, which fixed the lack of smoothness.
        My Marketplace assets:

        FPS Assemblable Gun

        Gun Sight Aligner

        Comment


          #19
          Hello. Is there any way to get your sight aligner to work in a replicated game. The sights work on the server but not on the client.

          Comment


            #20
            Hi,

            Could you tell me more precisely what your're having trouble with? I just did a test in multiplayer mode and the sights worked on server and on all clients (please see the pics below).

            Typically, in multiplayer, the anims themselves aren't replicated, they are controlled locally on the client by their character, but the character on the client is controlled by the character on the server (replicated). It worked in the pics below because each client is controlling his own anims locally, but one client won't see another client aiming down sights, unless you replicate the aim down sights command in the character. But you have to remember that the alignment happens on the FP floating arms, which aren't supposed to be seen by other clients anyway. If you're doing multiplayer with this character, you should add a whole body mesh to him to be seen by the other clients. This whole body mesh doesn't need to align the sights, you just need to add a generic aiming pose to it so, from outside, he looks like he's aiming his gun. Please tell me more preciselly where you're having trouble right now and I'll see how I can help you better.


            Click image for larger version  Name:	multi1.jpg Views:	0 Size:	300.8 KB ID:	1741621

            Click image for larger version  Name:	multi2.jpg Views:	0 Size:	317.2 KB ID:	1741622

            Click image for larger version  Name:	multi3.jpg Views:	0 Size:	316.2 KB ID:	1741623
            Last edited by PeaceSells_; 04-04-2020, 09:47 PM.
            My Marketplace assets:

            FPS Assemblable Gun

            Gun Sight Aligner

            Comment


              #21
              Thank you for your reply. It turned out that there was an error on my part, I was updating the sight transform when I equipped the weapon, so I just had to change the custom event to Multicast and now it works.

              Comment


                #22
                Hey, I'm glad to hear that it's working. If you need anything, please ask!
                My Marketplace assets:

                FPS Assemblable Gun

                Gun Sight Aligner

                Comment

                Working...
                X