Home Game Development Speed of Physics2D simulations are dependant on frameRate in Creator 3.5.2 – Cocos Creator

Speed of Physics2D simulations are dependant on frameRate in Creator 3.5.2 – Cocos Creator

0
Speed of Physics2D simulations are dependant on frameRate in Creator 3.5.2 – Cocos Creator

[ad_1]

Hi,

We are utilizing DistanceJoint2D to simulate a easy pendulum. We have noticed that each time the body price falls beneath a sure level on some gadgets, the physics simulations decelerate considerably.

To make certain, we carried out an experiment by setting the fixedTimeStep and the sport frameRate. We have noticed that the physics simulation slows down when the body price falls beneath (1/fixedTimeStep).
For instance if the body price is 29.99 fps and the physics fixedTimeStep is 1/15, then it really works superb so long as the fps stays above 15 fps. But, if fixedTimeStep is ready to 1/60, then the velocity of physics simulation drops to nearly half and if we additional lower the fastened time step to 1/120, the velocity lower to the quarter whereas the body price stays at roughly 30. This behaviour can’t be blamed on the computing energy of the machine as a result of it really works superb when fixedTimeStep is ready to 1/120 and body price is ready to 144.

How can we stabilise the physics behaviour so as to get the identical outcomes no matter the body price? Am I lacking one thing?

Edit: The identical behaviour is noticed in Creator 5.6.0 additionally.

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here