Don’t modify Time.fixedDeltaTime
(unless you understand what you’re doing, and have a specific reason to do it). Also, don’t use it in scripts in place of Time.deltaTime
. Time.deltaTime
will have the correct value when inside the physics loop (FixedUpdate). Time.fixedDeltaTime
is a setting; not meant to be used as a parameter for doing stuff. The time-related stuff meant to be used will only have getters, and no setters.
Interpolation will smoothly move objects between the last fixed-update’s state (position, rotation, velocity, etc) and the current one, at the rate of fixedUpdate. This makes the movement smooth, but introduces a bit of “lag”, as objects take a physics frame to reach the state where they would normally already be at if not being interpolated. There can also be a “weirdness” to collisions, noticeable in slow-motion, as the previous state can be pre-collision, while current state can be post-collision, and so the interpolation can have inconsistent speed (slow down before collision, and/or “bounce” without visually colliding).
Extrapolation will smoothly move objects between the current fixed-upate’s state and an extrapolation (prediction) of the next state. This has the opposite problem of interpolation, as moving objects can be “visually ahead of where they are physically”, and overlap a bit (more than usual) before collisions are actually detected.
You can make a quick experiment to visualize this. Put 3 cubes side-by-side at a height (y) of 8, make a plane (at y 0) with a physics material with bounciness set to full (1) and to use the maximum as the bounce combine behaviour. Give all the cubes a Rigidbody component. Set one of the cubes to interpolate, another to extrapolate, and leave the third with “None”. Go to Edit - Project Settings - Time, and set the timescale to something like 0.05 (5%). Click play and watch what happens.
The cube without interpolation represents the true physics position of the object, and does small “teleports” as the physics loop (FixedUpdate) updates it.
The cube with interpolation lags behind the “real” cube a bit, and the “real” cube updates just as it catches up.
The cube with extrapolation goes ahead of the “real” cube a bit, and the “real” cube updates just as it gets “too far” ahead.
As for making things look smooth in slow-motion:
The “explosions” you’re experiencing are probably because the overlaps between colliders that are used for collision-detection. You have to remember that the physics engine pushes objects away from eachother if they are overlapped. And an overlap considered small for a longer/higher fixedDeltaTime might be, and probably is, considered large on a shorter/lower fixedDeltaTime. Or at least you can think of it like that. Technically speaking, what is actually happening is probably that, upon changing the fixedDeltaTime while things are overlapping just a bit, that overlap is now taking multiple physics frames to “push out”, and each attempt of the physics engine to push the objects out of the overlap is adding force, which accumulates, and when the objects separate, they “explode” away from eachother, rather than just separate.
If you make sure objects are not overlapping when you change the fixedDeltaTime, or if you have a lower fixedDeltaTime from the start (strongly recommended) rather than changing it at runtime, this will probably not happen.