Gabeh So, I noticed mod operator is not working the way I thought. For example. GDScript Output: 4 % 24 = 4 -4 % 24 = -4 Python Output: 4 % 24 = 4 -4 % 24 = 20 I wonder if Godot´s mod operator works differently with negative numbers
Zini Correct. GDScript % matches C %, unfortunately. For the equivalent of Python % use the posmod function. See here: https://docs.godotengine.org/en/3.5/classes/class_%40gdscript.html#class-gdscript-method-posmod