move rigidbody without velocity code example
Example 1: rigidbody freeze position through code
rigidbody.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ;
Example 2: unity move with rigidbody.moveposition
rb2D.MovePosition(rb2D.position + velocity * Time.fixedDeltaTime);