Forwards and backards also turns left & right?


By the end of lecture 155 I’ve got a weird problem, and I can’t figure out what is going wrong!

So, when operating the two tracks independently, if I press the buttons together then I can set the throttle to 1 and the tank moves forwards in a straight direction. (great!)

However… if I try to move the tank using the single button control, then the tank turns left or right in addition to going forwards or backwards. (forward+clockwise for +1, backward+anticlockwise for -1).

Any ideas why that might be? (I have check in the Tank_BP and the newtons force is the same for each track)

Do you have your project on github or somewhere so I could take a look?

Cheers Dan - give me a sec i’ll make a commit :slight_smile:

Hi Dan,

Here we are - it’s the latest commit (24 - BattleTank - moving forwards with single button control also induces turning left & right)

Many thanks for this!

Sorry its a bit of a wedge at 900MB (clearly need to adjust my gitigore)

Argh, Dan I’ve figured it out.

The forwards motion I was getting was just me wigwaming my way forwards (like moving a boat with 1 oar at a time)

So it was 100% turning and the reason was because I had set both the tracks to the left track in the blueprint here:

(Highlighted is corrected now)

The reason the problem would not manifest by operating them seperately is because they were plugged into their own tracks to set elsewhere:

Was literally about to post that. Building the solution looked like it was going to take a while so I went for lunch and did the dishes, come back, find your problem and then saw you beat me to it :stuck_out_tongue:

Edit: I added debug logs in both MovementComponent and TankTrack to see the what was up and the problem became apparent

Haha, sorry and thanks for the help Dan!

Privacy & Terms