- Home /
Jumping height is massively different in build compared to editor
Hi, im having issues with my game where the editor has different outputs to the actual final build. Im making a platformer game and when I play the game in the built version the jump height increases massively compared to the editor jump height. Also some other scripts aren't working also for example I created a script that makes the game go in slow motion temporarily, which works perfectly in the editor but in the built version, when switching between scenes, the script seems to not work in some scenes, but work fine In others. Does anyone have any idea of why this might be? or give me any direction to how I could solve this. Thanks in advance ;)
@hathk Please post the relevant jump handling code so we can help you. One possible cause is that you're not properly making your movement frame-rate independent, the side effects of which you would see if build performs faster.
Ive attached the scripts as .txt files as they are quite long. Sorry the code isn't maintained very well as I have one main script that manages all the player movements :/
Thanks. You're using a lot of Time.deltaTime, also by default in functions like SmoothDamp; I can't fully tell in the whole of the code if there's still an issue. One approach for you would be to reduce your issue to a $$anonymous$$imal reproducing code case (i.e. how you can create the issue again with the least amount of lines).
Answer by unity_e-SXBZw0j2m2LA · Jul 11, 2020 at 07:02 PM
I just had the same problem and my mistake was that i was applying the gravity value and not gravity * Time.deltaTime. This led to my jump being shorter than in the editor, because i had a higher framerate in the actual build
If you want a working example look at this!
Your answer
