The rider IDE is informing me that the following is inefficient
transform.Translate(moveDirection * speed * Time.smoothDeltaTime);
and wants to re-write it as
transform.Translate(Time.smoothDeltaTime * speed * moveDirection);
Anybody know why ?
Its all multiplications, whats the difference ?
For some context, here is the value of speed and moveDirection
private Vector3 moveDirection = Vector3.left;
private float speed = 2.5f;
I am little confused in understanding why its better ?
Can anyone help?
Thanks