コード例 #1
0
    //Set which axis of this gameobject's transform will be used as the direction for the raycast;
    public void SetCastDirection(CastDirection _direction)
    {
        if (tr == null)
        {
            return;
        }

        castDirection = _direction;
    }
コード例 #2
0
        /// <summary>
        /// Set the base raycast variables
        /// </summary>
        private void CalibrateRaycast()
        {
            origin        = tr.InverseTransformPoint(col.bounds.center);
            castDirection = CastDirection.Down;
            float length = 0.0f;

            length    += (colliderHeight * (1.0f - stepHeight)) * 0.5f;
            length    += colliderHeight * stepHeight;
            baseLength = length * 1.001f;
        }
コード例 #3
0
    void Cast(Stroke[] strokes, CastDirection dir)
    {
        Glyph newGlyph = Glyph.CreateGlyph(
            strokes,
            glyphInput.sampleDistance
            );

        currentCast = dir;
        glyphInput.Cast(newGlyph);
        glyphInput.ClearInput();
    }