when FixedUpdate() will be called first time? the moment begin running or the moment first interval finish?

when will FixedUpdate() be called first time? the moment begin running or the moment first interval finish?
i do some tests, the moment begin running is result, but why? isn’t right that the moment first interval finish?

I just sent you a private message.

2 Answers

2

Refer to the documention:

FixedUpdate is called the first time after Start has been called.

FixedUpdate is called before the internal physic update. Note that FixedUpdate can be called several time in row to catch up with the elapsed time since the last frame. This happens when the fixed time step is less than the time elapsed since the last frame. (FIxed time step can be set in Edit > Project Settings > Time).

You can experiment with the following script to observe exactly when FixedUpdate is called.

using UnityEngine;

public class FixedUpdateTest : MonoBehaviour
{
    void Start()
    {
        Debug.Log(string.Format("S t={0:0.000}", Time.realtimeSinceStartup));
    }

    void FixedUpdate ()
    {
        Debug.Log(string.Format("F t={0:0.000} dt={1:0.000}", Time.realtimeSinceStartup, Time.deltaTime));	
	}

    void Update()
    {
        Debug.Log(string.Format("U t={0:0.000} dt={1:0.000}", Time.realtimeSinceStartup, Time.deltaTime));
    }
}

Thx, ericbegue , i understand the execution order of FixedUpdate(), while my problem is not about this, my problem is Why FixedUpdate() called first time is not until the moment first fixed physics update interval ends. Maybe my expression is not accurate. I asked same Question in Frum, described more accurate, you can read it. [link text][1] [1]: http://forum.unity3d.com/threads/no-matter-how-long-i-set-timestep-after-clicking-play-mode-fixedupdate-run-immediately.408461/

is it to my email? because I lost my email password I cant logion my yahoo email

message me here or I can giv u my new email address

[Unity Conversations][1] has nothing to do with your email. It is hosed on the Unity forums site. If you go to the link you can log in just like you log in to [Unity Answers][2] (most likely the same password). Once logged in you can also change your personal info, like your emails address. [1]: https://forum.unity3d.com/conversations [2]: http://answers.unity3d.com

I have found the Answer what i need. Thanks @ericbegue Again.
link text