Joystick setup will force trigger the released event of the right joystick

hi epic:

I currently use the joystick for controlling my character. But i have a problem when used it. I want to use the left joystick to controller character movement and the right joystick for controlling character shoots enemy.If i pressed the right joystick button, and then pressed left joystick button, the engine will force trigger the released event of right joystick. Is it one issue? can any one show me idea about it ? thanks.

I sent one key event to notification engine to control character action when pressed the right joystick. I debug game with debug editor , and found if the engine has collected some keys which were pressed recently, and if there is new one was pressed. It seems like the engine will force flush the pressed key for resetting their states as released. I currently only forbid that operation on mobile platform. But i think that is not very perfect. Need i register new one events for notification engine user want to control character when pressed the right joystick? Thanks

Hi ,

Is your project in C++ or in blueprints?

C++ project.

Hi ,

I tried to replicate this issue, but was unable to do so. I created a new code project and added in two action mappings, one for each thumbstick on the gamepad. Then in code I added four functions to the character class that each output a specific debug message when they were called. The functions were set to be called when one of the thumbsticks was either pressed or released. When I played in Editor and Standalone, the functions were all called appropriately. Even if I pressed and held the right or left thumbstick and then pressed the other one, the released function didn’t trigger until that thumbstick was actually released.

Could you provide a little more information about this issue?

  • What version of the Engine are you using?
  • Are you using the binary version of the Engine installed by the launcher, or did you build the Engine from source code?
  • Could you explain how you are setting this up in code?

Hello, sorry for lately response.

I added code in SVirturalJoyStick.cpp file. I uploaded two images for you can make sense that code.

thanks

Just a quick clarification question. Are you referring to using the virtual control sticks on a mobile device, or are you using an actual physical controller?

I am using the virtual control sticks.

Sorry for the delay in getting back to you on this issue. I copied your code changes into my Engine and packaged a project to an Android device. I was still able to move the character with the left virtual joystick and rotate the camera with the right virtual joystick. Using both simultaneously also worked when I would touch first one and then the other one. I was using version 4.6.1 when I tested this.

I have a few more questions for you:

  • What mobile device are you testing your project on?
  • Do you see the same results if you package to a different mobile device?
  • What template did you use when you first started your project?
  • Did you make any other changes to the Engine source code?
  • Would you be able to upload your project so we can take a look at it?

Hi :
1. i test it in ipad air;
2. I created my project without ant template, just with startcontent;
3. of course, but i am sure the other code will not cause this situation;
4. I bind this event in controller, so i can received the relase event when touch right-stick first and then touch the left-stick, finally the right-stick will be released;
5. I have upgraded the engine to 4.6.0, this problem that i meet in 4.5 version, but i am not sure if it has been fixed in 4.6.1. So maybe you can try to test it.
thanks.
.

Hello ,

I have been trying to reproduce the issue mentioned in the post and I have a few questions for you that will help narrow things down a little further.

Quick questions:

  1. Have you had a change to try and reproduce this issue on a later version of the engine?
  2. How exactly are you setting up a notification that tell you that the Virtual Joystick has been released?
  3. Can you reproduce this issue in a clean project?
  4. If so, could you provide a detailed set of steps to reproduce this issue on our end?

Hello ,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.