Handles.DrawSolidArc help

I’m producing a tool for randomizing objects rotations, and I want to display on the scene the potential result via an arc showing the random rotation range.
So far, no problem for the global eulerAngles previewing, I’m using this piece of code and the result is correct into the Scene view.

Example with a [-45 , 45] range on the Y eulerAngle

Handles.DrawSolidArc(go.transform.position, Vector3.up, Quaternion.AngleAxis(minY, Vector3.up) * (Vector3.forward), maxY - minY, 2f);

I’m trying to achieve the same thing for the localEulersAngles modification (ie: if the object is parented to another rotated 180 on Y, then the disc should point at the opposite direction) but cannot figure out the mathematics to use into the DrawSolidArc method…
I’ve tried multiple guesses like this one but none is the one I’m looking for…

Handles.DrawSolidArc(go.transform.position, go.transform.up, Quaternion.AngleAxis(minY, go.transform.up) * (go.transform.forward), maxY - minY, 2f);

I would greatly appreciate any help on this !

Handles and gizmos are a bit weird when it comes to rotation. If you want to do particular rotation and scale work to them, you need to assign a Matrix4x4 to the Handles.matrix static field, using the object’s Transform.localToWorldMatrix: Unity - Scripting API: Handles.matrix

This often means you don’t need to apply a position in your handles call, otherwise you get an offset. So instead you can just provide Vector.zero as a position.

In some cases you’ll need to return the Handles.matrix back to Matrix4x4.identity.