jrouwe/JoltPhysics

Limiting render rate to simulation frequency (#873) Causes simulation to jitter in the sample app.

voidstorm opened this issue · 2 comments

Hi!

Nothing serious, but I figured the info might still be relevant to you. I just found out that this particular check-in: #873 causes the simulation in the sample application to jitter. Especially in the vehicle and character controller sample. However, the check-ins before that work fine. It seems to be specific to the screen setup I'm using - a laptop / geforce 3070 connected to an external screen. The jitter happens only on the external screen. If I move the window over to the builtin laptop screen, the jitter disappears. It might have something to do with how dx12 handles v-sync.

Edit: Just realized it also jitters on the built-in screen, it is just barley noticeable.

The camera is attached to the vehicle and is updated before the physics step. If we don't update physics in a frame (because of too high fps) then the camera moves to the vehicle location after the physics step but since we don't run the physics step the vehicle doesn't move leading to what you perceive as jitter. I probably need to turn this around.

Should be fixed now, thanks for reporting!