Announcement

Collapse
No announcement yet.

Plugins: Gesture Recognizers & Look At Movement Component

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

    Plugins: Gesture Recognizers & Look At Movement Component

    I've been meaning to package some functionality from Republic Sniper up into plugins so non-C++ UE4 developers could benefit from them, and I finally found some time to do it.

    Here are the first two plugins carved out of the Republic Sniper code. One is a set of Gesture Recognizer components, the other is a simple movement component for keeping an object oriented at another object.

    The source code for these two plugins is available here: on Github.

    Any future UE4 plugins we release will be added to this repository.


    Look At Movement Component

    This plugin adds a new movement component that can be added to any actor. This movement component will cause the object to always orient itself toward the local player, another actor, or a world location.

    Although the look-at logic is fairly simple, we found ourselves repeatedly implementing the same logic to orient a turret, camera, or other object toward the player or another actor. It seemed logical to wrap it up into an engine plugin so that the logic would exist in just one single place.

    Use:
    1. Add the `Look At Movement Component` to an actor.
    2. Configure in the inspector to specify whether the actor should look at the local player, another actor, or a specific world location.
    3. There is no step 3. You're done.


    Installation: Unzip the package into the Plugins directory of your game. To add it as an engine plugin you will need to unzip the module into the plugin directory under where you installed UE4.

    Note: binaries for Windows 64-bit and Mac OS X are included. If you want to use it on any other platform, you'll have to compile yourself.

    Download: https://dl.dropboxusercontent.com/u/...nentPlugin.zip

    Mobile Gesture Recognizer Components

    This is a set of gesture recognizers for touch devices, implemented as Blueprint-spawnable actor components that can be attached to any character, pawn, or other actor. These recognizers correctly take into account the screen resolution and scaling factor. The following gesture recognizers are available and ready for use:
    1. UTapGestureRecognizer - a "smart" tap recognizer than can recognize multi-taps (double, triple, etc) without triggering false positives (e.g. no single-tap when double-tap happens), and also supports multi-finger taps (e.g. two-finger double tap).
    2. UInstantTapRecognizer - a not-so-smart but fast recognizer that tells you when any finger touches or leaves the screen. Useful when the delay needed by UTapGestureRecognizer for recognizing multi-taps might be a problem in terms of game play
    3. USwipeGestureRecognizer - a smart swipe recognizer that can recognize horizontal, vertical, diagonal, and edge swipes.
    4. UPanGestureRecognizer - allows you to get notified when fingers move on the screen. Works well, but right now, only a single pan recognizer can be used reliably.


    The following gesture recognizers mostly work, but still needs some love:
    1. UPinchRotateGestureRecognizer - A gesture recognizer that notifies when a two-finger pinch or rotate gesture is happening



    Future plans include moving the touch-processing code to a shared class to reduce redundant processing and improving the pinch/rotate gesture.

    Installation: Unzip the package into the Plugins directory of your game. To add it as an engine plugin you will need to unzip the module into the plugin directory under where you installed UE4.

    Download Link: https://dl.dropboxusercontent.com/u/...nentPlugin.zip

    Note: binaries for Windows 64-bit, Mac OS X, and iOS are included. If you want to use it on any other platform, you'll have to compile yourself. I'll be adding Android binaries shortly.

    Feedback, suggestions, and bug fixes are welcome.
    Last edited by Kneebiter; 08-02-2015, 09:23 AM.

    #2
    I did a short video showing how to install and use the Look At Movement Component:



    I'm also working on one for the gesture recognizers. Those are more involved, though, so it may take a few days to finish the video.

    Comment


      #3
      Finished the Gesture Recognizer video. Shows how to install it and basic usage of the gesture recognizers:



      The Win64, MacOS, and iOS binaries have all been updated to reflect the most recent code. I also added Android ARM7 binaries today.

      Comment


        #4
        Cheers jeff_lamarche,
        This is a real time saver and one less repetitive thing I need to worry about (thumbsup)

        You should submit this back upstream via a GitHub Pull Request so a larger audience can potentially benefit from this plugin if it's accepted into the UE4 codebase.

        P.S. I'm glad to see Republic Sniper is making good headway (I just checked your your forum thread + subscribed to your newsletter), now I feel guilty for not checking in on the project for several months (subscribing to https://forums.unrealengine.com/show...epublic-Sniper now) as it seems like I've missed some pretty epic art/feature drops :O
        Regards,
        Benjamin D. Smith

        Founder & CEO | Binary Sword Pty Ltd
        Currently working on: ODIN Tracker (UE4 Plugin)

        Comment


          #5
          Benjamin:

          Thanks for the kind words. We've been kind of radio silent on Republic Sniper since getting back from WWDC, but hope to get back into the update groove before too long.

          Comment


            #6
            Thank you Jeff. Totally awesome! fyi: 2nd video is marked as private. I cannot view it.
            Last edited by jasonh2013; 08-06-2015, 03:23 PM.

            Comment


              #7
              Originally posted by jasonh2013 View Post
              Thank you Jeff. Totally awesome! fyi: 2nd video is marked as private. I cannot view it.

              Sorry, fixed.

              Comment


                #8
                Works great Jeff! As an incredibly novice programmer, and someone new to ue4, AND someone trying to quickly and easily implement swipe this is a GREAT and easy solution. There have been 3 solutions on these forums that I've discovered over the past few weeks, and this is by far the easiest to work with (others required visual studio or complicated blueprint coding).

                And that video of the gun turrets systematically demolishing those people lined up in a row is hilarious. I love it. So fun to watch.
                Last edited by jasonh2013; 08-06-2015, 04:27 PM.

                Comment


                  #9
                  Wow ! Impressive and really usefull work, I'm pretty sure I'm going to use that on future projects. Thanks jeff_lamarche

                  Comment


                    #10
                    thanks jeff , do you have any plan to add windows multitouch support on your plugin ?

                    Comment


                      #11
                      This is awesome, thank you for submitting this to ue4!
                      Rule#117: "Be polite, be professional, but have a plan to kill everyone you meet."

                      Comment


                        #12
                        much appreciated . thank you

                        Comment


                          #13
                          Originally posted by vrMan View Post
                          thanks jeff , do you have any plan to add windows multitouch support on your plugin ?
                          vrMan - I'm honestly not sure what that would entail. The touch-detection stuff is abstracted by the engine so, in theory, it should work on Windows devices with touch screens. I've got a Surface downstairs so i can test it out.

                          I probably should generate a Windows32 bit version of the library. I'll see about doing that this weekend if I can find time.

                          Comment


                            #14
                            I really like that Look At Movement plugin, is there any chance you could add an option for it to follow the cursor? This could be useful for side scrollers and/or top-down shooters. Also, another thing that would be nice to see would be the possibility of "lag" similar to that of the Spring Arm has. Slowing it down a bit would be absolutely perfect for turrets so it's not on target all the time.
                            Why do all programmers wear glasses? Because they can't C#

                            Comment


                              #15
                              Originally posted by Dealman View Post
                              I really like that Look At Movement plugin, is there any chance you could add an option for it to follow the cursor? This could be useful for side scrollers and/or top-down shooters. Also, another thing that would be nice to see would be the possibility of "lag" similar to that of the Spring Arm has. Slowing it down a bit would be absolutely perfect for turrets so it's not on target all the time.
                              I plan to add a rotation speed. I've already implemented that in our turrets, so just need to adapt it to the plugin.

                              I hadn't really thought about looking at the cursor. I'll have to investigate what's involved in that, as the cursor is disabled on the stuff I've worked on.

                              Comment

                              Working...
                              X