0
\$\begingroup\$

I'm using Cocos Creator with (built-in) box2d for physics.

Recently our game behaves weirdly on our new device Galaxy S20 Ultra 5G - which has screen size = 1440 x 3200 - frequency = 120Hz.

After stop pushing, all our physical bodies almost stop immediately like they has very high friction. No other device react that way.

Anyone experienced this issue can give me an advice?

\$\endgroup\$
1
\$\begingroup\$

The problem is with high freequency 120Hz

Solution is to set fixed deltaTime for update physics world instead of using graphic update time

cc.director.getPhysicsManager().enabledAccumulator = true;

Docs can be found here: https://docs.cocos.com/creator/api/en/classes/PhysicsManager.html#enabledaccumulator

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.