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 !