How To Use A Playstation Controller In Unreal Engine 5 | Tutorial | UE5

Поділитися
Вставка
  • Опубліковано 29 січ 2025

КОМЕНТАРІ • 117

  • @RealityTwoGames
    @RealityTwoGames  Рік тому +5

    Thanks for watching! Definitely SUBSCRIBE!

  • @kamasireborn
    @kamasireborn Рік тому +28

    Doing it with a PS5, if the inputs are not registering when in the IMC_Default, you need to restart the engine. Then it should work.

  • @kamasireborn
    @kamasireborn Рік тому +14

    Thanks a lot for the video, really appreciated man!
    Edit: Don't know if it's the case of PS4 too, but if the PS5 controller is not plugged in the moment you open the Engine, it won't work. So if while you,re working you unplug it then plug it back in, it will require you to relaunch the engine.

    • @RealityTwoGames
      @RealityTwoGames  Рік тому +1

      No problem, brother! FYI, i have another video on getting the D-PAD controls to work. It's in my souls like series Playlist. :)

  • @ViUnGames
    @ViUnGames 7 місяців тому +5

    Fantastic tutorial. No bullshit, straight to the point, and it worked like a charm. Thanks a bunch.

  • @Mab0r0shi
    @Mab0r0shi 5 місяців тому +1

    Finally, a good and easy PS4 controller tutorial video!

  • @Kantor3D
    @Kantor3D Рік тому +3

    Worked like a charm, thank you!

  • @lukmana8030
    @lukmana8030 Місяць тому +1

    you know somehow you saved me from brain fog, thank you

  • @Alpha_GameDev-wq5cc
    @Alpha_GameDev-wq5cc 14 днів тому +1

    Can you program adaptive triggers or haptic feedback kinda stuff too?

    • @RealityTwoGames
      @RealityTwoGames  11 днів тому

      You can indeed. Use a node called force feedback.

  • @bilalu.9149
    @bilalu.9149 Місяць тому

    It was straight forward and worked great! Thank you a lot!

  • @Will-qn2jn
    @Will-qn2jn 21 день тому

    Lifesaver! Thank you. I love the internet

  • @GonzElias
    @GonzElias 2 місяці тому

    I had to close and re open the engine in order to get my ps4 controller recognized, but it worked, thanks

  • @azythegreat
    @azythegreat 2 місяці тому +1

    THANK YOU!
    Question: Is auto-detect possible rather than manually added through RawInput?

  • @christopherarendt3531
    @christopherarendt3531 8 місяців тому +4

    If I'm going through all this to set up for a specific hardware ID, will everyone else have the same hardware ID? Or how will my game understand all other players using other dualsense controllers that I don't own? Or other forms of controllers? Isn't there a better, more generic way?

    • @RealityTwoGames
      @RealityTwoGames  6 місяців тому +1

      Good question. I'm actually not too sure on this. I'd have to look into it.

    • @KDmadness18
      @KDmadness18 3 місяці тому +2

      Here's the good news and bad news:
      Vendor ID: 0x054C (This is Sony’s official vendor ID).
      Product ID: There can be several depending on the model. For example, a common one is 0x05C4 (original DualShock 4) or 0x09CC (revised version with the light bar on the touchpad).
      Third-party PS4-compatible controllers will have different vendor and product IDs depending on the manufacturer.
      With that being said, if you are going to upload your game to Steam, their Steamworks SDK might be able to help. I haven't tried it yet, but I'll put it on my to-do list.
      ---------------------------------------------------------------------------------------------------------------
      For now, here's a helpful guide from chatgpt lol:
      You already have a working input setup for PS4 controllers using the RawInput plugin, but you're facing an issue where you need to specify a vendor ID and product ID for the controllers manually. You're hoping to leverage the Steamworks SDK to handle controller input more dynamically without relying on these hardcoded IDs.
      How Steamworks SDK Can Help with Controller Input (Steam Input)
      Steam Input (part of the Steamworks SDK) offers a more universal solution for handling controllers by automatically recognizing and mapping controller inputs, including PS4 controllers, without needing to manually enter vendor or product IDs. Here's how you can use Steam Input to simplify the process:
      1. Use Steam Input for Controller Mapping
      Instead of manually entering IDs, Steam Input allows you to manage controller support for a wide range of devices (PS4, Xbox, etc.) by letting Steam recognize them automatically. This can free you from having to hardcode product and vendor IDs in your game.
      Steam Input provides automatic controller detection and configuration. You can configure different controllers (like PS4, Xbox, or generic gamepads) through Steam’s interface, and Steam will ensure the correct mappings are applied when a user connects their controller.
      2. Steps to Integrate Steam Input into Your Game
      Enable Steam Input in Your Steamworks Dashboard:
      Go to your Steamworks game's settings and enable Steam Input under the Steam Input Per-Game Settings section.
      This tells Steam to manage input for your game, using the player’s Steam Input settings for their controller.
      No Need for RawInput Product or Vendor IDs: With Steam Input enabled, Steam will recognize the controllers automatically without needing you to specify vendor/product IDs. This is particularly helpful because it supports a wide variety of controllers, including the PS4’s DualShock 4.
      Configure Your Game for Steam Input:
      Ensure that your game is configured to use Steam Input rather than relying on RawInput product/vendor IDs.
      You can use Steam Input’s controller configuration tool within Steam to map buttons and axes to your game actions.
      Fallback to RawInput if Needed: You can still use RawInput as a fallback if Steam Input is not enabled. In this case, you might still have to enter vendor and product IDs manually, but this would only happen when running the game outside of Steam.
      3. How to Use Steam Input in Unreal Engine
      Step-by-Step for Steam Input Setup:
      Install and Integrate Steamworks SDK:
      Follow the usual steps to integrate Steamworks SDK into your Unreal Engine project. This involves including the SDK in your project, setting up the Steamworks subsystem, and ensuring that Steam is running in the background.
      Enable Steam Input API in Your Game’s Configuration: In your Steamworks dashboard, enable Steam Input for your game. This tells Steam to handle input configuration.
      Test Controller Mappings: Once Steam Input is enabled, you can test the controller mappings directly through Steam’s Big Picture Mode or the controller configuration interface. This will allow you to map specific controller inputs (such as the PS4 controller’s buttons and sticks) to your game’s actions.
      Optional Customization:
      You can offer custom controller configurations for your game. Players will also be able to create and share their own configurations using Steam Input.
      Disable RawInput IDs: After Steam Input is fully integrated, you can disable the need for vendor/product IDs from RawInput entirely. Steam will handle this automatically.
      4. What You Gain from Using Steam Input:
      Universal Controller Support: Steam Input supports a wide range of controllers, not just the PS4 DualShock. It ensures compatibility with Xbox controllers, Switch Pro controllers, and others.
      No Need for Vendor/Product IDs: Steam will automatically handle device recognition, so you don’t have to manage these IDs yourself.
      Custom Configurations: Players can customize their controller mappings directly within Steam, saving you from having to implement complex in-game control settings.

  • @deathman7419
    @deathman7419 4 місяці тому +1

    do you have a video of how to set up the d-pad and R2 and L2 triggers your stuff is great

    • @RealityTwoGames
      @RealityTwoGames  3 місяці тому

      i go over d-pad controls in this video
      ua-cam.com/video/tIcWUu0LCtY/v-deo.html

  • @QuesoGr7
    @QuesoGr7 10 місяців тому +1

    So for me, on the part where you click on "select the key value", it always selects "GenericUSBController 4" without doing anything on the controller. And when I try to play it, I can only move with the right stick and nothing else. Any idea what might have went wrong?

    • @RealityTwoGames
      @RealityTwoGames  10 місяців тому

      Try restarting the engine. Otherwise one of your other inputs may not be disabled.

    • @QuesoGr7
      @QuesoGr7 10 місяців тому

      @@RealityTwoGames
      Well now nothing happenes even tho I only enabled index 0-3 like you said. No idea what's going on...

    • @QuesoGr7
      @QuesoGr7 10 місяців тому

      Also, do you have DS4Windows or anything running?

    • @RealityTwoGames
      @RealityTwoGames  10 місяців тому

      i don't. are you using a ps4c controller? or a ps5 controller?@@QuesoGr7

    • @QuesoGr7
      @QuesoGr7 10 місяців тому

      @@RealityTwoGames
      PS4

  • @jaumevila8722
    @jaumevila8722 Рік тому +2

    After check rawinput plugin and restart unreal engine editor I can't see the option 'Raw Input' in my project settings. Tried to close and open unreal but still can't see it.
    Thanks in advance & the video!

    • @RealityTwoGames
      @RealityTwoGames  Рік тому

      Hmmmm. I've not seen this. Would you happen to be using a Mac?

    • @glittergamer765
      @glittergamer765 11 місяців тому

      ​@@RealityTwoGames I'm using Windows 11, and I also have this problem

    • @glittergamer765
      @glittergamer765 11 місяців тому +1

      I found the solution! You have to go into Plugins(underneath the Settings Tab) and tick the box for the "Windows RawInput"

  • @nicolasnguyen1611
    @nicolasnguyen1611 9 місяців тому +1

    Thank you for the video, it was helpful. Do you have experience with force feedback on ps4/5 controllers? I've searched and haven't found anything useful about it.

  • @josephmpyana
    @josephmpyana 4 місяці тому +1

    Using a generic off the shelf controller called "Betop" and this worked for me., AWESOME!!!! Stick drift probably due to controller wear or config but for development purposes should work out okay

  • @lostwoods91
    @lostwoods91 2 місяці тому

    Thank you so much!!
    I noticed that in order to make a PS5 work, you can only disable "GenericUSBController Axis 8" (and not all the axes).
    Strange behavior!

  • @Huedini74
    @Huedini74 18 днів тому +1

    Ha! What a lifesaver, thank you

  • @gustavcfer
    @gustavcfer 3 місяці тому +1

    Thanks, this helped me a lot!

  • @SébastienMartin-o8b
    @SébastienMartin-o8b 5 місяців тому +1

    Working on the Input Mapping context but not working in game it's wierd.
    Do you need to setup something per controller ?

  • @joshuacadogan5174
    @joshuacadogan5174 Рік тому +2

    Hi thanks for the tutorial, I am having trouble. My ps5 controller seems to be putting in a constant input so my character wont stop walking sideways.

    • @RealityTwoGames
      @RealityTwoGames  Рік тому

      You have to disable all the inputs you aren't using.

    • @QuesoGr7
      @QuesoGr7 10 місяців тому

      @@RealityTwoGames
      The inputs or the indexes?

    • @BeinIan
      @BeinIan 6 місяців тому

      In the Axis Properties sections you may need to check the "Gamepad Stick" checkbox. If it's set to false then an untouched stick will be returning a value of 0.5 instead of 0, because the range is from 0 to 1 instead of -1 to 1.

  • @christopherfoster6105
    @christopherfoster6105 6 місяців тому +2

    I'm having the issue where my character is only moving in one direction. I'm using a ps5 controller and it setting all the mappings to one axis

  • @JustJoshinYouBro
    @JustJoshinYouBro 9 місяців тому +1

    Awesome man I appreciate the hell out of you for this. Would you know how I could lock the upperbody to the camera angle. So if I wanted my character to go backward instead of turning around he actually just walks backwards and same with moving side to side?

    • @BeinIan
      @BeinIan 6 місяців тому

      In your character blueprint, search for "Orient Rotation to Movement" in the details panel and uncheck the box :)
      Edit: Almost forgot, you also have to set "Use Controller Desired Rotation" to true.

  • @artorias6321
    @artorias6321 11 місяців тому +2

    thanks so much my man!

  • @Ogpandabrew
    @Ogpandabrew 4 місяці тому +1

    Yo man great tutorial! My only issue is when i use the look stick, it just automatically looks all the way down and i can't move it. i am not sure how to fix it

    • @RealityTwoGames
      @RealityTwoGames  3 місяці тому

      thanks! hmmmm not too sure. sounds like something may not have been set correctly in the IA. did you get it fixed?

  • @coffeediction
    @coffeediction 3 місяці тому +1

    6:25 kinda missing information here, did you cut the video?
    I dont have any of it. When I create it, its empty, I cant expand anything. Need to watch a tutorial to setup something to be able to watch this tutorial.
    Thanks anyways tho!

    • @RealityTwoGames
      @RealityTwoGames  3 місяці тому

      Nah I didn't cut anything out. Did you ever figure it out?

  • @s.v.midnigth
    @s.v.midnigth Рік тому +2

    Thanks dude. That awesome

  • @AdenDurham
    @AdenDurham 7 місяців тому +3

    does anyone know how to look at the ids with windows 11?

    • @bailster15psn14
      @bailster15psn14 6 місяців тому

      ua-cam.com/video/bW6GHPvfsRQ/v-deo.html

    • @RealityTwoGames
      @RealityTwoGames  6 місяців тому

      Not too sure on that one 😞

    • @muntasirdawlut
      @muntasirdawlut 6 місяців тому +4

      click on the search bar -> search for settings -> on your left of the settings window select bluetooth & devices -> Click on devices on your right -> then on your right scroll to the bottom -> click on more devices and printer settings -> a window shall open and you can follow along with the tutorial

    • @julawitkowska8553
      @julawitkowska8553 5 місяців тому

      @@muntasirdawlut thank you so much!!!

  • @Hotberginaa
    @Hotberginaa 9 місяців тому +1

    I have a question but its not related to this video at all. Its a bit complicated but...
    Do you know how to use a gyroscope of a ps5 controller into unreal ? in order to for example control an object....
    I find no topic on this :(

    • @AlexelTech
      @AlexelTech 2 місяці тому

      Yes I'm working on that too for my game, I'll post it here if I find how to use the integrated tilt & roll axis of the Dual Sense Controller...
      It must be one of the *many* axes of the RAW input axis, probably

  • @patricolamusic2849
    @patricolamusic2849 3 місяці тому +1

    I´ve done all the steps but the little keyboard that selects the key value doesn't get yellow. As soon as i click with the mouse the "GenericUSBController Axis 5" appears

    • @patricolamusic2849
      @patricolamusic2849 3 місяці тому

      When i deactivate Raw input the little keyboard button gets yellow

    • @RealityTwoGames
      @RealityTwoGames  3 місяці тому

      This happened to me as well at one point. I don't remember the fix but i believe it to be needing to deactivate the unnecessary inputs

    • @NinjaBirdStudios
      @NinjaBirdStudios 2 місяці тому

      Did you find a solution? I'm in the same boat lol

    • @FrogFraction
      @FrogFraction 29 днів тому

      @@RealityTwoGames I've tried this, and while that does make the instant input stop. After that i have 2 axis entries left. I have set the analog sticks boolean. But then when i want to detect inputs, nothing happens.

  • @Mr.dreamZz
    @Mr.dreamZz Місяць тому

    i cant get the vendor id becuase im on windows 11

  • @Vamps_vps
    @Vamps_vps 5 місяців тому +1

    Hey, your tutorial is perfect but the cross don't work, please help (i use a ps5 controller)

  • @rhiku117
    @rhiku117 9 місяців тому +1

    Does this work for packaged game like controller support for full game? Or just in unreal?

    • @RealityTwoGames
      @RealityTwoGames  3 місяці тому

      I have not tested it, but I will definitely need to try and see

  • @berniemovlab8323
    @berniemovlab8323 Рік тому +1

    Great Info Thank You :)

  • @ahmadjadallah2811
    @ahmadjadallah2811 5 місяців тому

    Will this work for my end users playing a shipping build with their own controllers? Or does it only work for me as a developer in my Unreal Engine Editor?

    • @Daronchic
      @Daronchic 5 місяців тому

      Yes, it should. All my IDs match exactly, so I think they’re the same for everyone.

  • @Hotberginaa
    @Hotberginaa 10 місяців тому +1

    please can you do the tutorial for ps5

    • @RealityTwoGames
      @RealityTwoGames  10 місяців тому

      I don't have a ps5 controller 😕 😪

  • @tabbianbg6881
    @tabbianbg6881 8 місяців тому

    The inputs for look and move are normal but the jump button is set to circle on ps4 controller and I can’t change it to x any help with what I’m doing wrong

  • @luckycogstudios
    @luckycogstudios 8 місяців тому +1

    Is this the recommended way to use Playstation controllers with UE5?

    • @RealityTwoGames
      @RealityTwoGames  6 місяців тому

      Hmmmm. Not sure. It's the only way I'm aware of at the moment.

  • @shotarcherz1690
    @shotarcherz1690 6 місяців тому

    This is very hard to do with my Flydigi Apex 4 which has a dongle that can do xinput, dinput and cable xinput and dinput as well as bluetooth

  • @Misterred-GW2
    @Misterred-GW2 8 місяців тому +1

    Thank you very much!

  • @RamblingGreek
    @RamblingGreek Місяць тому +2

    Why tf is something so simple, so complicated to enable...

  • @lemoncitronne477
    @lemoncitronne477 7 місяців тому +1

    Thank you!

  • @julsius
    @julsius 22 дні тому +1

    will it work with PS2? :D

  • @syedsaadjamal7471
    @syedsaadjamal7471 5 місяців тому +1

    not working for me :( the character is moving on only 1 direction

    • @RealityTwoGames
      @RealityTwoGames  3 місяці тому

      Something is likely messed up with your IA

  • @mansourjaber7450
    @mansourjaber7450 Рік тому +1

    thanks

  • @Hotberginaa
    @Hotberginaa 10 місяців тому +1

    but one day i just connected my ps5 controller with the app ds4 and it works directly in unreal

  • @andersoncamargo6190
    @andersoncamargo6190 6 днів тому

    Obrigado!!!!!

  • @savardjessy5523
    @savardjessy5523 5 місяців тому +1

    Merci sa marcher 👍

  • @IronSevenX
    @IronSevenX Рік тому +1

    I tried this with a PS5 controller, and it didn't work. The only way I can get my pc to read my controller inputs at all is through Steam, or DS4 Windows to emulate an Xbox controller.

    • @RealityTwoGames
      @RealityTwoGames  Рік тому +1

      Hmmmm. Have you tried restarting unreal? In my first attempt, it didn't work until I restarted after adding the controller configuration. If so, it could be the axis values aren't correct. The easiest way to know if you're getting any input at all would be to check the jump button and see if that one works. The movement and look Inputs may just take some tweaking in the project settings.

    • @IronSevenX
      @IronSevenX Рік тому

      @RealityTwoGames Oof, this really weird thing happens where my pc tries to use my controller's input jack as a speaker by default instead of as a controller whenever I plug it in. It's rare, but annoying, and when it happens, even steam can't see my controller 😂 Thanks for getting back to me! 😁

    • @RealityTwoGames
      @RealityTwoGames  Рік тому +1

      Ahhhh weird lol so you got it working? And no problem!

    • @IronSevenX
      @IronSevenX Рік тому +1

      @RealityTwoGames I'll give it a try lol I'm in a dnd sesh right now 😂 but it should. It starts behaving like it should once I correct this 👍
      Edit: It definitely worked! Thanks, man! This is pretty awesome!

    • @RealityTwoGames
      @RealityTwoGames  Рік тому +1

      That's awesome! Glad it worked!

  • @tormaandras1374
    @tormaandras1374 Місяць тому

    I would like to use an 'old' Genius USB F-23 joystick in Unreal Engine. If anyone could help me set it up, I would be very grateful.

  • @denischetyrin6980
    @denischetyrin6980 6 місяців тому +1

    xD it works

  • @pnvgordinho
    @pnvgordinho Місяць тому

    Are you serious?. Unreal has a lot to learn from Unity.