How does the code know that I`m pusing buttons now?

Hello. people!

My code is working :slight_smile: But I want to understand: when the code call function to check my input(do I still push the button)? In my example (Toon tanks) I`m asking about Move() function. It is called every frame, but inputs it requires, are supplied by
“void APawnTank::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)” (line 40)

But when the code calls this function? It is outside every Tick function, and it is not called by any other.

Those functions within SetupPlayerInputComponent just bind functions, they don’t call the functions there, the input component will call them.

For axis bindings the input component will call the function you bound to it each tick. For action bindings it will call them when the input event is detected.

More info: Input Action And Axis Mappings In UE4 - Unreal Engine

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms