Tuesday, November 8, 2022
HomeGame DevelopmentFramerate & PhysicEngine - Drawback on excessive refreshrate telephones - Cocos Creator

Framerate & PhysicEngine – Drawback on excessive refreshrate telephones – Cocos Creator


Good day Cocos Group, :grinning:

i rly hope you may assist me out, trigger it makes my mind crumble. :exploding_head:

I’m utilizing the cocos creator model 2.4.10.

I’ve a Drawback on excessive refreshrate telephones.
On some it really works, on some not.

I can’t set the framerate neither the FIXED_TIME_STEP from PhysicsManger.

Right here is how i attempted it:

cc.recreation.setFrameRate(60);
let physics_manager = cc.director.getPhysicsManager()
physics_manager.FIXED_TIME_STEP = 1/60;

On excessive frames it applies gravity, drive and so on… totally different than on 60 fps.
The bounce for instance is extraordinarily low powered on excessive frames.

right here is how i apply the drive for bounce:

this.Rigid_Body = this.node.getComponent(cc.RigidBody);
this.Rigid_Body.applyForceToCenter( cc.v2(0,70000) , true);

However not solely the bounce, the stroll drive will get utilized totally different too even after I use a scheduler as a substitute of the Replace Methodology.

The telephones override it nevertheless it’s configured.
On the Oneplus7tpro(additionally a 90hz Telephone) it really works simply nice.
Now I switched to a Samsung Fold 4 and there it overrides it to 120hz and on another telephones too.

I don’t know on tips on how to implement a variable refresh fee to the Physics Engine trigger so far as i do know its replace is certain to the Machine’s Body fee.

Is there any answer to this, or one other solution to make the Physics replace to a set interval?
I’m additionally open to different approaches.I simply wanna get this mounted… :neutral_face:

Thanks upfront!
Patrick


RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments