Proper use of dt

0 favourites
  • 8 posts
From the Asset Store
Jump on alphabets in the proper order and reach the sun!
  • Is this the correct way to use delta time. every tick: set angular velocity to: self.TouchPower*(Touch.x-self.touchx)+(60*dt)? Im still trying to figure out how it works. Thanks for any insight guys!

    Tagged:

  • Think in terms of wanting movement to stop if frame rate goes to 0.

    Look at it as if expecting dt to be zero.

    Anything times zero is 0

  • Think in terms of wanting movement to stop if frame rate goes to 0.

    Look at it as if expecting dt to be zero.

    Anything times zero is 0

    That makes sense, But Im still trying to figure it out for my example up there. I understand how it would work for platforming style movement etc. I know its an odd looking setup, but I cant figure out how to make it frame rate independent. I thought it would be by default as is just measuring the distance between two points to set a velocity on something. So i figured it would just kind of "catch up" on the next frame. But that doesnt seem to be the case. Any idea how Id go about that?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Not sure what you are doing but all the behaviors have dt applied already.

  • Not sure what you are doing but all the behaviors have dt applied already.

    Basically Im trying to make this completely frame rate independent. It is a set velocity that is placed on Every Tick.

  • For frame rate independent you wouldn't want dt.

    There's a setting in preferences if you want to do that.

    For frame rate dependant its (total value)*dt

    Because dt can be zero, or fps can be less than 60 etc.

    Remember dt is the time since last last tick.

  • For frame rate independent you wouldn't want dt.

    There's a setting in preferences if you want to do that.

    For frame rate dependant its (total value)*dt

    Because dt can be zero, or fps can be less than 60 etc.

    Remember dt is the time since last last tick.

    If you mean setting the stepping mode to Frame Independent I have done that, its still not completely smooth. Still jitters and slows down a tad when the frame drops. I haven't just tried multiplying by dt in this case, so Ill give it a go.

  • Delta time just makes sure ( and even that not necessarily always correctly ) that your objects move the exact same distance in pixels within the same amount of time, but it does not guarantee smoothness of movement.

    And I don't get exactly if this is part of physics ( seems according to your posts ), but it seem like it should be TouchPower = not *. Also you need to multiply distance difference by 60 and then multiply the result of that by dt

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)