2DCharacterControllerTutorial icon indicating copy to clipboard operation
2DCharacterControllerTutorial copied to clipboard

Grounded not set on first game loop

Open GuySky opened this issue 2 months ago • 0 comments

In the main controller script program first checks if the character is grounded before the variable gets any value. So after initialization the private variable "grounded" first being checked for its value and only then being defined as "false". It doesn't seem to cause any bugs or exceptions and is likely handled by the language compiler. However, it is considered a bad code style and may cause serious issues if being rewritten in laguages like C or C++.

GuySky avatar Nov 04 '25 10:11 GuySky