Quantcast
Channel: Answers by "luniac"
Viewing all articles
Browse latest Browse all 34

Answer by luniac

$
0
0
OH MY GOD I FIGURED IT OUT!!!! okay so here's the deal: My timestep and max timestep were both .02, I designed my game at 60 fps in the editor, and my android build runs at 60 fps as well. I have an FPS script that reports fps to me in game BUT it has a flaw which happened on the ipad but i didn't realize it at first. Basically the ipad was defaulted to 30fps because i didn't set Application.targetframerate to 60 fps. My fps script was reporting 50, which was actually the .02 physics step but i didn't realize that at first, i thought it meant 50 fps!!! So i set application targetframerate to 60, and i raised max time step to .04. My ipad build ran at 60 fps and everything works perfectly. HOWEVER, i now know that forcemode IMPULSE forces are dependent on TimeStep, at 60fps impulse forces last longer than at 30 fps. Setting max time step to .04 means that if frame rate dips below 50fps the fixed step will start increasing to maintain the same physics game speed, but it will weaken impulse force strength. Althought my game is super simple so It will never go below 60 fps, I would be very interested in knowing how to make impulse forces frame rate independent. Multiplying by time.deltaTime doesn't work.

Viewing all articles
Browse latest Browse all 34

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>