Unity Tips - nomrand/__basics GitHub Wiki

Tips

Pause

Time.timeScale = 0.0f;

[FixedUpdate()] method don't called. and [Time.deltaTime] set to 0.

so, code below don't work


    private void FixedUpdate()
    {
        GetComponent<Rigidbody>().AddForce(new Vector3(5.0f, 0f, 0f));
    }

    void Update ()
    {
        GetComponent<Rigidbody>().AddForce(new Vector3(500.0f, 0f, 0f) * Time.deltaTime );
    }

and move again,

Time.timeScale = 1.0f;
⚠️ **GitHub.com Fallback** ⚠️