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.
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.
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.
Roblox’s physics update runs at 1/240hz / 240fps; Because of this roblox does it entire physics simulation between RunService.PreSimulation and RunService.PostSimulation (I believe) and because of this you only see the results of the physics step at RunService.PostSimulation. Which means in your accumulator yes you may run your code at 240 fps however your updates into the physics engine are not reflected until after PostSimulation which is why it’s not as simple a fix as that and instead you have to integrate the physical bodies yourself with their inertia tensor etc… See here