Hey z game forum.
I'm working on a platform game in z game editor and I've just noticed that the main character jumps lower (in terms of height)
on a slow pc
rather than on a fast pc.
Obviously I'd like to have a standard height reached regardless of the speed the game is currently running on.
the Y position of the main character is currently set as currentmodel.position.y+grav
and "grav" is set to grav-=app.DeltaTime/1
any idea why this isn't syncing to the speed of the pc?
I was under the impression that adding app.DeltaTime fixed this problem.
J
app.DeltaTime sync with frame rate
Moderator: Moderators
Re: app.DeltaTime sync with frame rate
Hi jinxtengu,
K
Getting the exact same jumping height using a varying time-step is actually a little more tricky than you might think ... that being said you probably want to use "CurrentModel.Position.Y+grav*App.DeltaTime" ( instead of just "CurrentModel.Position.Y+grav" ).
K
Re: app.DeltaTime sync with frame rate
Ah ok thanks, I'll try to factor that into the gameplay.Kjell wrote: ↑Mon Jun 10, 2019 1:24 pm Hi jinxtengu,
Getting the exact same jumping height using a varying time-step is actually a little more tricky than you might think ... that being said you probably want to use "CurrentModel.Position.Y+grav*App.DeltaTime" ( instead of just "CurrentModel.Position.Y+grav" ).
K