[ad_1]
Hello Cocos Community,
i rly hope you possibly can assist me out, trigger it makes my mind disintegrate.
I’m utilizing the cocos creator model 2.4.10.
I’ve a Problem 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.
Here is how i attempted it:
cc.sport.setFrameCharge(60);
let physics_manager = cc.director.getPhysicsSupervisor()
physics_manager.FIXED_TIME_STEP = 1/60;
On excessive frames it applies gravity, pressure and many others… completely different than on 60 fps.
The bounce for instance is extraordinarily low powered on excessive frames.
right here is how i apply the pressure for bounce:
this.Rigid_Body = this.node.getComponent(cc.RigidBody);
this.Rigid_Body.applyForceToCenter( cc.v2(0,70000) , true);
But not solely the bounce, the stroll pressure will get utilized completely different too even once I use a scheduler as an alternative of the Update Method.
The telephones override it nevertheless it’s configured.
On the Oneplus7tpro(additionally a 90hz Phone) it really works simply high-quality.
Now I switched to a Samsung Fold 4 and there it overrides it to 120hz and on another telephones too.
I do not know on the right way to implement a variable refresh charge to the Physics Engine trigger so far as i do know its replace is certain to the Device’s Frame charge.
Is there any resolution to this, or one other method to make the Physics replace to a hard and fast interval?
I’m additionally open to different approaches.I simply wanna get this fastened…
Thanks upfront!
Patrick
Have you tried setting enabledAccumulator to true?
1 Like
Yes, you could first get the refresh charge of the system after which set the Physics Engine.
Yes that’s it! Thank you!
[ad_2]