-
Notifications
You must be signed in to change notification settings - Fork 912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: Force is not applied consistently when time scale is reduced #5915
Comments
Hi @krunkster,
I'm surprised it used to work before but still, this fix gave a result that felt natural to me with the project you sent (each click is considered and the ball reacts accordingly with a similar feeling as when the time scale is 1) |
@D8H's answer is more pertinent than my Pull Request (I've been too hasty), you should apply their recommendations |
"D8H's answer is more pertinent than my Pull Request (I've been too hasty), you should apply their recommendations."
I’m not sure how the reproduction provided indicates that I’m trying to set a speed rather than apply a force?In my actual game I want to apply a force to simulate the reaction of one object being struck. Think like a ball and bat or golf. I believe in this case a force is more appropriate than an impulse.
|
An impluse is a not a speed, it's an impulse of force. A force at an impact that is applied only once. It's a bit the same as changing the speed but the mass is taken into account. Where as the "Apply force" action is a force that is apply over a period of time, while the action is used. If this action is called only for one frame, the force is applied during 1/60 of second at 60 fps and 1/30 of second at 30 fps. |
Thank you for your help, and I appreciate that the docs and help text have been updated over the last year as well. |
Yes, you can divide by 60 when replacing a force action with an impulse action. |
Is there an existing issue for this?
Describe the bug
Trying to apply a force to a physics2 object does not work consistently when time scale is reduced. Sometimes it will work but often it fails to apply the force at all.
This is a regression in 5.3... well somewhere between this spring and 5.3... sorry I don't know which version I upgraded from exactly... but it was probably 5.2.168
Steps to reproduce
issue-force-time-scale.zip
Attached simple reproduction.
GDevelop platform
Desktop
GDevelop version
5.3.180
Platform info
Additional context
No response
The text was updated successfully, but these errors were encountered: