Hello !
In this lesson we set the player’s movement by using Input.is_action_pressed for each of the directions. I found out we can also use Input.is_anything_pressed to have the same result in a single line. Is there any drawbacks to this, like performance-wise ? Here’s my code for reference. Thanks !
Seen that in the docs for the Input class.
I suppose it jist means that it’s going to return true if any input is made.
I can’t see anything relating to performance on it.
But you’d still have to handle any inputs needed.
Functionally i suppose it would do what you want it to, bit might be harder to read.
I’d be curious to see if there’s a specific use case for this input method tho.
1 Like
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.