Name | Description |
---|---|
center | The center of the circle. |
normal | The normal of the circle. |
from | The direction of the point on the circle circumference, relative to the center, where the arc begins. |
angle | The angle of the arc, in degrees. |
radius | The radius of the circle |
Draw a circular arc in 3D space.
Wire Arc in the Scene View.
// Create a 180 degrees wire arc with a ScaleValueHandle attached to the disc
// that lets you modify the "shieldArea" var in the WireArcExample.js
@CustomEditor (WireArcExample)
class DrawWireArc extends Editor {
function OnSceneGUI () {
Handles.color = Color.red;
Handles.DrawWireArc(target.transform.position,
target.transform.up,
-target.transform.right,
180,
target.shieldArea);
target.shieldArea =
Handles.ScaleValueHandle(target.shieldArea,
target.transform.position + target.transform.forward*target.shieldArea,
target.transform.rotation,
1,
Handles.ConeCap,
1);
}
}
And the script attached to this Handle:
// WireArcExample.js
var shieldArea : float = 5;