I am making a marble style game and for some reason, my jumping is messed up. While on my end of both the editor and the packaged product, the ball jumps normally. However, when giving the game to a friend to test, they jump absurdly high. I have tried several things to fix this, but nothing so far has worked. What am I doing wrong and how can I fix this?
Hey there @Overseeing_Industry! We’d have to take a look at how you handle the jumping. If it’s physics based, the issue could stem from the difference in framerates.
The issue was due to framerates, since I was using physics. Do you know how I can fix this issue though. I am optimizing my game at the moment, but I want to make sure that the issue is resolved for good.
The specific math for it will come down to if you’re firing the impulse or adding force, and if it’s once or over a number of frames. Off the top of my head, if the difference is linear, you could find a consistent value by multiplying your impulse force by delta time. Though that’s for normalizing movement vectors normally and less so about force, though its possible it applies the same here.
Are you using add force or impulse?
Are you firing once or over multiple frames?
I am using add force. It is only triggered once. I have a boolean that gets set to false after jumping.
if its only triggered once, try using add impulse, force is for constant forces
This worked! So for anyone that is having the same issue, when using “Add Force”, the amount of force depends on the frame rate. Use “Add Impulse” if you wan the force to be applied once instead of it applying it continuously.
Thank you for helping me along with this issue.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.