I figured that the way we implemented delta time should make it frame rate independent. But when I comment out “SetTargetFPS(60);” the gravitation buggs out.
I really can’t understand why.
Do we have to set a target FPS anyway?
I figured that the way we implemented delta time should make it frame rate independent. But when I comment out “SetTargetFPS(60);” the gravitation buggs out.
I really can’t understand why.
Do we have to set a target FPS anyway?
Hi there! Can you describe how gravity is bugging out for you?
I can jump just half a character (roughly) into the air and it takes about 5 seconds to get back to the ground again.
And the only thing I’ve done is comment out the SetTargetFPS(60). If I change it to another value it works (although can get glitchy at low FPS but that is to be expected)
Try changing velocity and gravity to float instead of int.
As frame rates get higher, deltatime gets closer to 0, so multiplying an int by a value close to 0 is likely to result in 0
thank you! that did wonders
Glad I could help
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.