Unity: Для Системы частиц не работает Emission Module при использовании Rate over Distance

В уроке Tanks tutorial — Tank Creation & Control для создания эффекта пыли из под гусениц используется настройка Системы частиц не «Rate over Time», а «Rate over Distance», которая для расчета использует скорость объекта. Ее она берет из переменных Rigidbody, вместо того,чтобы рассчитывать самостоятельно, как это было до 5 версии Unity. Поэтому в данном уроке при движении танка вперед или назад, пыль не будет симулироваться:

«When a RigiBody is attached to a ParticleSystem we now use the velocity from the Rigidbody instead of calculating it.

The reason for this is that the Rigidbody and the particle system would have different velocity values which would cause particle to behave incorrectly, particularly at large velocities.

We now allow the Rigibody to control the velocity when attached (and kinematic). By dragging a particle system in the scene the Rigidbody will not update its velocity, however child systems calculate a local velocity using positional difference and then apply this to the Rigibody velocity which is why it still works with children providing they do not have a Rigibody attached.

If you wish to drag the object in the scene then you would need to either remove the Rigidbody or write a script to update the Rigibody velocity value to match the dragging action.

There is a small icon to indicate that a Rigidbody is being used in the Inherit Velocity module, we will move this to the main module so it is more obvious.»Unity Support

В связи со этим, для того, чтобы при движении танка вперед или назад из-под его гусениц шла пыль, нужно в скрипте TankMovement.cs заменить строчку:

        m_Rigidbody.MovePosition(m_Rigidbody.position + movement);

на новую строку:

        m_Rigidbody.velocity = transform.forward * m_MovementInputValue * m_Speed;