rotate around different pivot unity code example
Example: rotate vector3 around pivot point unity
public Vector3 RotatePointAroundPivot(Vector3 point, Vector3 pivot, Vector3 angles) { return Quaternion.Euler(angles) * (point - pivot) + pivot; }