- Home /
forcemode2d.impulse do we need time.deltatime?
If im using forcemode2d.impulse force on a rigidbody2d in FixedUpdate()
do i need to multiple the value by time.deltatime?
Answer by Bunny83 · Mar 18, 2016 at 05:22 AM
Impulse should be used if you want to apply a one-time impulse on the object like a jump for example. This is related to the physical impulse. A "force" has to be applied over a certain time. An impulse is the result of such a process. In Unity it's the accumulated force which has been applied for one second.
So no, you shouldn't use Time.deltaTime when applying an impulse on your object. However if you plan to apply a force every frame you shouldn't use forcemode.impulse but either "force" or "acceleration".
Impulse and velocitychange are ment for immediate one-time changes.
I used impulse forcemode forces to achieve a certain feel in my game, and i don't really wanna change it at this point, however I found out an interesting issue that im not sure how to fix.
With impulse forces, timestep makes a difference in how the force affects the rigidbody.
I designed and calibrated my game at 60 fps and default .02 fixed step. $$anonymous$$y maximum fixed step is .04 so when the game is at 30 fps the fixed step increases to accommodate 30 fps, BUT now the impulse force is much weaker, im assu$$anonymous$$g because there are only 30 physics steps ins$$anonymous$$d of 50 per second now.
What's the math to modify the impulse force value to adapt to any timestep? right now i just have: rigidbody2D.AddForce(Force , Force$$anonymous$$ode2D.Impulse);
Your answer
![](https://koobas.hobune.stream/wayback/20220612072304im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to check force or velocity on character? 1 Answer
Adding force to rigidbody2d to slide 1 Answer
2D Animation does not start 1 Answer
Adding 1 frame of force 2 Answers
Horizontal attraction? 0 Answers