Did anyone manage to prevent double-speed ? with dual controls

Say I want to retain Gamepad Left Thumbstick Y-Axis as move forwards / backwards
while using Gamepad Right Trigger as move forwards
and Gamepad Left Trigger as move backwards

How do I prevent the maximum doubling of force applied to the ?

I tried creating a member variable, a float throwClamp in TankMovementComponent
that adds up all the throw values passed into it to clamp it at maximum -1 or +1.

But I quickly realised each Input Event (could be all 3 simultaneously !) are calling IntendMoveForward independently and I’ve no way of knowing when to reset (and apply the throw) throwClamp back to 0 right at the end of each frame.

Perhaps it’s some really simple wiring in Blueprints or a neat solution in C++.

If anyone has managed this and want to share how you got it working I would be grateful.

Hi there, we did solve this in our prototype, but decided it was a bit convoluted to teach.

One way is to have an intermediate variable that both input methods set. Then you clamp the total value of the two contributions.

Hi,
I’ve implemented a quick solution using two booleans in the Tank_BP blueprint.
It works well, the only limit is that you can’t use left stick and shoulder triggers together for moving forward and turning.

1 Like

Privacy & Terms