Draw XXL documentation


Draw Measurements.Angle(...);

Draw an angle measurement. See also AngleSpan().
The function returns the measured angle, depending on the "displayAndReturn_radInsteadOfDeg" parameter in degrees or radians.

Green parameters are required. Yellow parameters are optional, but have to be supplied in order.


static float DrawMeasurements.Angle(...);

Code snippet names: drawAngle and drawAngle_func.

Parameters:
Type Parameter Name Description
Vector3 from The direction from where to start the measurement.
Vector3 to The direction where to end the measurement.
Vector3 turnCenter A mounting point for "from" and "to", where in the Scene the angle measurement is drawn.
Color color The color of the angle display. The "from" and "to" vectors are colored by the static global settings DrawMeasurements.defaultColor1 and DrawMeasurements.defaultColor2.
float forceRadius
float lineWidth
string text
bool useReflexAngleOver180deg The two vectors ("from" and "to") always span 2 angles: an acute or obtuse angle below 180°, but also the reflex angle over 180° when turning the other way round. Use this bool to specify which one to take.
bool displayAndReturn_radInsteadOfDeg Default is "false", which means: using degrees.
float coneLength The parameter can be interpreted in different ways: It can be meant as absolute length or relative to the radius. The used interpretation is decided by the global setting coneLength_interpretation_forCircledVectors. The default interpretation is "relative to radius".
bool drawBoundaryLines This draws low alpha dashed lines along the two vectors "from" and "to".
bool addTextForAlternativeAngleUnit "deg" and "rad" are two different angle units. They can be displayed both or only one of them. See also the "displayAndReturn_radInsteadOfDeg" parameter.
float durationInSec The duration in seconds how long the drawn thing stays visible. The default value of 0 means that it stays only during the current Update frame. Instead of using this parameter you can also overwrite him with a global setting so you don't always have to supply all other preceding function parameters till you reach this late parameter.
bool hiddenByNearerObjects This specifies if the drawn thing will get hidden if other geometry is in front of it or if it shines through. It is the same as the depthTest parameter of Unitys Debug.DrawLine(). Not all drawing methods support toggling this in the same way. For some methods the lines are fully hidden, for others the hidden lines shimmer through. Instead of using this parameter you can also overwrite him with a global setting so you don't always have to supply all other preceding function parameters till you reach this late parameter.