How to add velocity in local rotation unity code example
Example: How to add velocity in local rotation unity
Vector3 forwardVel = transform.forward * speed * moveVertical;
Vector3 horizontalVel = transform.right * speed * moveHorizontal;
rigidbody.velocity = forwardVel + horizontalVel;