how to reset an angle unity code example
Example 1: unity reset rigidbody velocity
GetComponent<Rigidbody>().velocity = Vector3.zero;
GetComponent<Rigidbody>().angularVelocity = Vector3.zero;
Example 2: how to reset rotation in unity
transform.rotation = Quaternion.Euler(transform.rotation.x, transform.rotation.y, 0);