Jump to content

Delta Time


Brutile
 Share

Recommended Posts

Can the Time class get a delta time added to it please?

GetSpeed is really confusing, and isn't very useful.

Also, people transitioning from Unity would understand this a lot better.

 

It wouldn't be very difficult, you could just write a small function that returned:

1.0 / Time:UPS()

 

Then you could just go:

timer = timer + Time.deltaTime

 

and the time will count up in seconds, regardless of the frame rate

Link to comment
Share on other sites

Just multiply your values by GetSpeed(). I'm not sure what's confusing about that?

 

If your PC is the "perfect" timing GetSpeed() returns 1 (so multiplying your value by this does nothing to change it)

If your PC is really fast GetSpeed() returns < 1 (so multiplying by this will reduce your value to slow it down)

If your PC is really slow GetSpeed() returns > 1 (so multiplying by this will increase your value to speed it up)

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...