Input is always null then crashes

I setup the movement component just like I did the aiming component, as instructed to do in the lecture. Before trying to debug i checked the lecture only to find out I did everything identical to how ben did it.

What happens is when I start the game it prints messages that the tank is recieving input but the input is equal to (null). When i try to enter input, unreal crashes with the crash submission box.

I tried removing the gamepad input all together with the same issue. Removing the keyboard input would just prevent anything from being sent. It is almost as though the movement component is expecting.

I just solved this but I will post anyway

The problem was trying to output a float to the log as a string. I don’t think i’ve had issues with this before, but in this case it caused unreal to crash.

UE_LOG(LogTemp, Warning, TEXT("I recieved your input at: %f"), Throttle);

instead of

UE_LOG(LogTemp, Warning, TEXT("I recieved your input at: %s"), Throttle);

It was a very hard problem to catch because of the single letter change; and because unreal usually prints the float as a string automatically

the other problem is why my fk*ing tanking moves strait when making the left track move even tho its identical to the right…, yet when the two are combined it still moves strait with higher magnitude, and the inputs are indeed moving each part in isolation

I swear to god last night it worked normally too wtff

wow i just readded the component and the behavior is differnt wtf unreal. settings are identical

readded both of them and now its back to the same problematic way it was…

The tank model for the lecture is lop-sided! that is the problem

As you can see the left track and right track are in the same positional offset but appear in different coordinates… If you look at the turret from the top it will be off center aswell

Privacy & Terms