Identical method to Unity's FixedUpdate?

I am writing raycast based car chassis but it needs to run at fixed rate independently from the frame rate. If I use heartbeat it will be affected by frame rate and as of result the rate will fluctuate, which will cause the chassis to misbehave due to forces being applied inconsistently.

I need something like FixedUpdate which can be found in Unity’s game engine.

void FixedUpdate() {
  // ...
}
1 Like

IIRC, isn’t Unity’s FixedUpdate fired for every physics frame? If so, you could try using RunService.Stepped.

Roblox states in their engine documentation that the rate will vary depending on the performance of the machine, which is not what I am looking for.

Unless you use the deltaTime of the heartbeat and times it to the cars momentum, I honestly don’t think there’s a roblox equivalent to Unity’s FixedUpdate… Hopefully I’m wrong, though.

I found an old topic which found a solution to something similar to this a while ago, so I wrote a fixed update module.

Also to vouch for the module I’m using it in my game DashBlox for the physics overhaul/rewrite that I am currently working on, It’s also being used in my game RoStrike, and I will use it again when I attempt a 1-1 port of source engine movement to Roblox.

1 Like