Twin Stick Shooter Template Diagonal Fire Shot Bug

Unreal Engine Version: 4.7.5

Problem:

Pressing W + A to move Diagonally Up/Left and Press Up Arrow to Fire it doesn’t fire.

Pressing S + D to move Diagonally Down/Right and Press Down Arrow to Fire it doesn’t fire.

Hey ,

Did you change any of the blueprints within the template? I have been able to load up this template and pressing down W + A, pressing the up arrow does fire the projectile. Pressing S + D and moving with the down arrow also fires a projectile for me.

Looking forward to hearing back from you, thanks!

Hey ,

Unfortunately, I have not heard from you in quite a while. For recording and tracking purposes, I must close this thread at this time. However, if you have any further questions regarding this topic, please do not hesitate to reply to this thread and we’ll assist you further.

Thank you! :slight_smile:

Ok here’s another test to reproduce.

Press and hold the Up Arrow Key on keyboard to start firing.

At sametime you hold Up Arrow Key and firing press both the A and W keys (all 3 keys), this is supposed to rotate the ship to face the upper left direction (diagonal direction) but it doesn’t.

Now while still holding the Up Arrow Key press D and W at sametime (all 3 keys), see how it faces the correct direction (diagonal direction) while firing?

It will rotate the ship to face any direction as long as not firing, but if you use that combination of input it won’t fire.

Sorry for late response I’m recovering from injuries and I understand you have a timed process.

Nothing is changed in the template.

It might be my keyboard circuit design though it shouldn’t have the problem and it’s a newer Logitech USB wireless keyboard, when creating custom arcade input hardware I found some keyboards have trouble processing multiple key presses, so it maybe hardware related.

That problem is normally from the circuit logic of the key wiring and so if you press 3 or 4 keys at same time it can choke the input and not receive the keys properly which can also throw off timing. This happens in USB keyboards, while ironically the old PS/2 keyboards don’t have this problem.

This was first determined when playing fighting games such as Street Fighter and Mortal Kombat where the players may rapidly press multiple buttons in succession, if you used axis control to press in multiple directions indicating multiple key presses while pressing multiple keyboard button combinations to perform special moves this would lead to input lock.

Weither this is the cause I don’t know, if works for you then it could be the hardware, because the design of the template is a Twin Stick design, so the inputs are multiplied, so when we press W + A at sametime we’re pressing 2 buttons already, then when we press an arrow key that’s 3 buttons, depending on particular keyboard circuit, it could hit combination that chokes the input.

The other thing it could be is something with the input combination in the engine itself and the values somewhere.

That’s the onlything I can think of (that would be in the range of what the values do to produce Euler Gimbal Lock), which is due to the right combination of values causing the inverse of the values such as to a negative number instead of a positive one, which would for a camera force the camera to look in opposite direction and values to continue to be incorrect, thus losing the axis until unloaded and reloaded from/too memory.

Hey ,

Could you please provide me with a screenshot or a clip of this issue occurring? We want to make sure we’re seeing the same as you. I’m currently working out of 4.7.6, which is a version ahead of what you originally were using.

Also, are you creating this template with starter content, or changing the way this functions?

Thank you!

It’s happening with Unreal Engine 4.7.6 as well, I have Unreal Engine 4.8.0 Preview 1 now so I’ll check it out on that too. It’s difficult to screen shot something like that because I have to press multiple keys, I’m not sure if a video would make sense because you can’t see my key presses but I guess you’ll see when it’s not firing, ok I’ll try and do that, nothing has been changed, it’s using the Twin Stick Template.

It may sound silly, but the problem might be the quality of keyboard.

For example, I have a local multiplayer game where two players are using one keyboard. Pressing A and D at the same time completely blocks left and right arrow keys. Another example is, if my both characters going towards the same way (pressing A and Left Arrow), up arrow doesn’t work etc. Problem is not there if I use 2 keyboards though.

Generally laptop keyboards and cheap keyboards have that problem. An expensive keyboard may fix that problem. Or binding the attack move to other keys work.

Yeah, I was considering the Keyboard Encoder, the keyboard is a Logitech K360 I got a few months ago to replace the previous identical one I had used heavily, because it’s that specific keyboard and mouse worked better than any keyboard and mouse I’ve tested before, so you might be right, as mentioned in my previous post it might be a Input Blocking effect with the keyboard circuit, I did try using arrow key mapping but same issue, I haven’t had any input issues like this with any games or programs I’ve used with this keyboard except for this template.

If this is the case it might work with 2 Keyboards as it would be using 2 keyboard encoders and splitting up the circuitry more could confirm this, I do have the identical previous one. I found this keyboard and mouse to be better for me than the more expensive ones overall and I wouldn’t think to buy a keyboard just to get this template working, it would be cheaper to create my own keyboard encoder etc and use an existing but new arcade control panel. I may be able to rewire the template’s input and test that.

I may try an input flow choke on the Axis and see if it’s related, because the Axis inputs are ticked per every frame which means even if the input axis value is at 0.0 it is constantly trying to apply the input because the flow sent through and will be constantly processed even if nobody is moving a stick or doing any form of many controlled movement, and for every additional input axis added that is another constant flow on the graph being processed.

So guess that’s 5 things I could do.

  1. Make Video
  2. Dual Keyboards
  3. Setup Custom Input
  4. Test it on Custom Arcade Hardware
  5. Add an PlayerInputFlowChoke Macro

Thanks for the ideas!

Though it may be normal and by design, it must be taken into account when first setting up input for any devices which may suffer from any performance loss from it, to see that you can place a PrintString node to an axis value, and you’ll see the ticking operations per frame so it’s constantly polling the values.

You can use just input keys. When pressed, type “Gone through!” etc.

As far as I know, I got no problems using laptop keyboard + usb keyboard. So good luck :slight_smile:

Hey ,

I just tested this out again in 4.8 Preview 1 and I was not able to reproduce the issue that you were describing. Please upload a video so that I can see what’s happening. Also keep me updated on whether or not it’s a keyboard malfunction.

Thanks! :slight_smile: