- Home /
Another alternative of rigidbody.AddForce?
Hi!
I was just about to release my game when I noticed something BAAAAD. While using rigidbody.AddForce on my player, I noticed that the higher the FPS is, the faster the player goes. So players with good computers can finish a level in like 10 seconds while it takes 1 minute for people with bad computers. So I need another alternative. I tried transform.Translate but that just messed up the whole thing. My player is a sphere that rolls around so the rotation gets messed up on the way.
So do anyone know something like AddForce but doesn't rely on the FPS?
Thanks in advance
You really should do some more QA before you release. If you missed this well documented gotcha there will be other issues you miss.
$$anonymous$$aybe some beta testing would be appropriate.
@Bored$$anonymous$$ormon What do you mean by more QA? If you're saying new developers should ask more questions, I think the problem is that we don't know what to ask. Or did you mean something else by that? I'm open to advice :)
Sorry, QA is Quality Assurance.
The particular problem you mentioned is well documented. I'm slightly concerned that you might have missed something else that breaks your game when you release it.
So my suggestion is that before you release you get as many people as you can to play the game, specifically to look for bugs and things that can be broken.
Answer by kacyesp · Aug 30, 2014 at 09:53 PM
You should add force in FixedUpdate() since FixedUpdate() is independent of frame rate.
Here's a pretty good answer on how to handle inputs and where to apply physics when using Update() and FixedUpdate(): http://gamedev.stackexchange.com/questions/73713/update-vs-fixedupdate-in-unity
I'm glad you asked this because I didn't know this would be an issue. Now I have to go fix $$anonymous$$e lol...