cc.RigidBody PTM ratio dependent? How can I workaround this

Hi, I’m facing a roadblock where the physics performance of my game differs across devices. On most of my home devices, the physics of my game runs smoothly and fine.

However for weaker devices, the physics, specifically, is seemingly slow motion. But still, animations play across the same time duration. Some searches online have led me to the conclusion that the slower framerate is causing this.

After reading up, so far I’m guessing is that the internal physics code of Cocos Creator cc.RigidBody is affected by framerate and not related to my code as I have experimented and tweaked my code to call the code below as per .schedule() function every 0.01 seconds, which makes my code process the physics values and assign them to the cc.rigidBody’s linear velocity property every 0.01 seconds instead of .update(dt).

Am I approaching this the wrong way, or are there any workarounds you guys might know and would like to share? Thank you!

UPDATE
Upon further testing, I realise that for one of my laptops, which has QHD resolution, it turns lowering the resolution past a certain amount causes the game to run as per normal again.

On the other hand, my iPhone 7 device seems to render physics faster than usual.

I think this has something to do with the calculations involving the PTM ratio?

2 Likes

Did you attach the wrong screenshot?

Woops my bad, fixed the screenshot!

Upon further testing, I realise that for one of my laptops, which has QHD resolution, it turns lowering the resolution past a certain amount causes the game to run as per normal again.

On the other hand, my iPhone 7 device seems to render physics faster than usual.

I think this has something to do with the calculations involving the PTM ratio?

1 Like