Ejemplo n.º 1
0
    void FixedUpdate()
    {
        throttle = Mathf.Lerp(throttle, targetThrottle, Time.fixedDeltaTime * lerpSpeed);
        entity.AddForce(-transform.up * force * throttle);
        entity.AddTorque(torque * throttle);

        if (ps)
        {
            var main = ps.main;
            main.startSize = Mathf.Lerp(particleSizeRange.x, particleSizeRange.y, throttle);
        }
    }