Hey guys
I’m trying to use the RadiusHandle and scale it to match my transform:
/// <summary>
/// Draws the sphere emission shape.
/// </summary>
/// <param name="shape">Shape.</param>
private void DrawSphereEmissionShape(EmissionShape shape)
{
Handles.matrix = castTarget.transform.localToWorldMatrix;
shape.radius = Handles.RadiusHandle(Quaternion.identity,
Vector3.zero,
shape.radius);
}
At first the result looks correct, but as I start to pan around something very strange happens:
You can see that the “outline” loop is being drawn along entirely the wrong plane.
When I move, rotate and scale my object the handle transforms accordingly, but always I get this strange result with the outline.
Is this a bug with Unity or am I doing something wrong here?
Thanks,
Ves