I used delta time for every movement calculation so my game should be frame independet.
Somehow it runs faster on my 60hz monitor than on my 144hz monitor and I dont know why.
Any ideas?
this.entity.rigidbody.applyForce(forceX * dt, 0, forceZ * dt);
Force is not time dependent. No need for the dt
here.
Thank you, this worked.
Why doesn’t it need dt when i apply it in update()? I’m comming from unity so i dont really understand that
You will have the same problem in Unity. Force is newtons so there isn’t a time component.
Where as something like velocity is units per sec, will need to be multiplied by dt to get the distance moved each frame.
Because Unity AddForce == PLayCanvas ApplyImpulse, not ApplyForce
I was under the impression that Unity AddForce is applying force by default unless the mode is explicitly set to be impulse or one of the other modes.