novemberdev_first_person_shooter_godot
novemberdev_first_person_shooter_godot copied to clipboard
setting Engine.time_scale every frame causes framerate issues
Hey so I just discovered this while messing around the player script and I found out that setting the time scale to 1.0 every frame causes the game to lag on slower hardware.
a quick fix would be this :
else:
if(Engine.time_scale < 1.0):
Engine.time_scale = 1.0
this is just a small thing so if anyone ever used this tutorial as a template for their project or is using a toaster for godot like me, here's your solution.
also i recommend handling the time scale away from the player script, make it a function in a global singleton.