Announcement

Collapse
No announcement yet.

Control Mouse Cursor with Gamepad Joystick

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

    #31
    Ah! Didn't realize that, but it makes sense.

    Comment


      #32
      Got this from RyanB on epic staff. Haven't had a chance to work on it any though.

      "I think I have done that before but the exact method isn't coming to me right now but I think it will come to me soon.

      In terms of how to interact with the scene, you may want to look at the "Content Examples" player pawn. You simply do a line trace from the cursor into the world using the camera vector and then you can do "break hit result" on the line check and do different things based on different actors. What I usually do there is use an Interface system to communicate. Then you can easily have items that contain their own logic entirely.

      Ie you could have an "Interact" interface, and when you click something in the world, it passes the interface message to the hit actor. The interface would have a reply boolean, and if the actor clicked implements the interface, the pawn would get the reply and set a local variable for "interaction actor"... then you can pass input from the pawn to "selected actor" and then have the selected actor decide when to deselect itself/whatever. Basically that would be another interface sent back to the pawn saying selection is done, and the pawn would set some boolean like "Object Selection = false" and then set "selected actor" to none. You could also use the "IsValid?" macro on that selected object variable to avoid needing a boolean."

      Comment


        #33
        GamePad UMG Plugin

        Dear OP,

        I made a plugin that allows using a gamepad like a mouse in UMG menus, Epic's Nick Darnell who made UMG in the first place did the code, I wrapped it in a plugin for you all to enjoy:

        https://forums.unrealengine.com/show...l=1#post394032

        100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

        UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

        Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

        Comment


          #34
          Thank you Rama and Nick, this looked confusing to me (limited programming knowledge) but it was actually easy and works SO Great!!

          Comment

          Working...
          X