Exemplo n.º 1
0
        // private

        private void OnDrawGizmos()
        {
            const float DrawScale   = 0.05f;
            var         origin      = transform.position;
            var         destination = origin + strength * DrawScale * transform.forward;

            GizmoUtil.DrawArrow(origin, destination, Color.gray, 0.1f);
        }
Exemplo n.º 2
0
        private void OnDrawGizmos()
        {
            var origin             = transform.position;
            var strengthMultiplier = Mathf.Clamp(strength, 0.1f, 1f);
            var destination        = origin + strengthMultiplier * transform.forward;
            var offsets            = new Vector3[]
            {
                Vector3.zero,
                0.02f * transform.up,
                -0.02f * transform.up
            };

            foreach (var offset in offsets)
            {
                GizmoUtil.DrawArrow(origin + offset, destination + offset, Color.gray, 0.1f);
            }
        }