[tutorial - Space Shooter] about smoothing in EvasiveManeuver.cs

void FixedUpdate() {
float newManeuver = Mathf.MoveTowards(rb.velocity.x, targetManeuver, Time.deltaTime * smoothing);
rb.velocity = new Vector3(newManeuver, 0.0f, currentSpeed);

I know “Time.deltaTime” is the time between last two “Update()”.

Then why that code used “Time.deltaTime” in “FixedUpdate()”?

I know we use “Time.deltaTime” if we need to move something like kinematic with constant speed in “Update()”.
(like “transform.position += const_velocity * Time.deltaTime”)

Of course, we use “Time.deltaTime” with “Mathf.MoveTowards()” or “Mathf.Lerp()” for smooth moving.
But I think it is also natural in “Update()”.

In my test, FPS is about 110~120 with large variation.
Anyway, “FixedUpdate()” is called 50 times per second.

If there are 30fps and 120fps games, acceleration(=increase of velocity) of 30fps game is greater than 120fps game’s. I think using constant like 1/120 is better than this.

I think “Time.deltaTime” is meaningless in “FixedUpdate()”.

Is it just because the game is simple game and we cannot recognize the difference?

Despite what many people say, FixedUpdate does not run on it’s own fixed time loop, instead it’s called many(or no) times after the Update loop. This post does a much better job of explaining this than I could.

I did not check Scripting API.

In “Time.deltaTime” document,
“When called from inside MonoBehaviour’s FixedUpdate, returns the fixed framerate delta time.”

In “FixedUpdate()”, “Time.deltaTime” equals to “Time.fixedDeltaTime”.

I solved my problems.

Thank you for all answers.