Engine.set_time_scale and RigidBody

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Kohl

I’m creating a physics-based puzzle game, which has a slow-motion mode enabled when you right-click using the Engine.set_time_scale (.3).

But I noticed that rigidbody objects behave differently when they are “falling” in slow motion. They lose strength, going less far than when the time_scale is normal.

In the first part of the video it appears in normal mode, then with Engine.set_time_scale (.3) enabled. You can see that the second time the object goes less far than the first.

video here

Does anyone know why? Does not have a way the rigidbody objects do not change the path when under the Engine.set_time_scale (.3) effect?

I was able to confirm what you are observing as well. Unfortunately, my power went out so I couldn’t finish testing. I wonder if this is an issue with the joints? In my case, i only used 1 joint to attach 2 rigid bodies together and another to attach those to a static body. The apex of the movements were very close…off by maybe 0.2, but perhaps this gets amplified with more complex setups? When it comes back on, I want to test the movement in various situations where there are no joints involved.

I think it should be brought up as an issue on the githib site for official clarification/acknowledgement.

2D||!2D | 2018-05-20 14:59

It isn’t just when joints are involved. I did a simple drop test where the regidbody hit a static body and obtained x directional movement. There are discrepancies in the values. Also, I also had a rigidbody where I applied an impulse in the x direction and determined where it eventually settled on a staticbody surface. This had discrepancies as well.

2D||!2D | 2018-05-20 16:12

I started to write the post about this bug in github this morning, but first I decided to create a new isolated test project (this: https://we.tl/EMwt9JDX57) with pinjoints and I did not identify the problem. As I did not have time to do more testing, then not sending the bug report on github.

But I tested “explode” rigidbodies with appy_impulse (this: https://youtu.be/NLHQXN8xK9I ) in my project and also has difference in the distance as well. Tomorrow I will do more tests, if it is the case, report on github.

Thank you!

Kohl | 2018-05-20 17:45

Did you ever figure out if this was a bug or not? I am interested in some slow motion effects as well and wondering if this is an option in v3.

Judd Gledhill | 2018-08-20 20:55

I have noticed this also. Softbodies also behave differently at different speeds. Have you found a fix yet?

TheSecurityDev | 2019-05-08 16:56

Is this tracked somewhere? @Kohl Did you eventually open a GitHub issue?

bluenote | 2019-12-18 13:53