Pass in dt to BindToRenderStep function

RunService:BindToRenderStep takes a function to call on the render loop. A dt parameter for the amount of time elapsed since the last render loop iteration should be passed to this function. I find myself computing dt manually almost every time I use BindToRenderStep.

The RunService.RenderStepped event passes dt to its listener but, as you probably know, it’s much more limited than BindToRenderStep since you can’t specify priority.


In what scenario would this be useful?

1 Like

Say I want to animate something with a varying, unpredictable velocity. For example, gun recoil. Every time the player shoots the gun, its velocity changes. I need a function to update the gun’s CFrame every render loop. This function needs to know dt to know how much to displace the gun.

In general, dt is essential to almost all physically based animation.


In one of my upcoming projects, I’m handling all animations and effects locally to keep space for the server and network to do more important things. This means that animations can be handled at different speeds for each user which isn’t very desirable. Right now i’m using a self-made delta time method to size, position, and animate things correctly based on the time between the last frame and the current frame.

I believe having a built in system for delta time would be a lot more useful reliable.

OH i thought you were wanting to define an amount of time to wait between each call.

Yeah of course we should give you a delta value. I thought were already were :confused:


It’s passed in a regular connection to Renderstepped, but not functions bound using BindToRenderstepped.

1 Like

This would be a great addition. I need to use a delta time value for just about every render-binded function I use.


Any update on this?


I think these provide some very valid use cases. We will need to look into this a bit more assess if this is something we want to implement.




YYEESS thank you!

1 Like

Almost anything for you man. Almost.


Am I missing something or does the documentation still pretend that there’s no dt parameter?


Documentation likes to pretend there’s no dt parameter.

1 Like