Beispiel #1
0
        /// <summary>
        /// creates the Vectors for later display
        /// </summary>
        private void SetupVectors()
        {
            // draw vectors
            fwdVR.Color  = new Color(0, 0, 1);
            fwdVR.Vector = selectedInstance.groupCenter.gameObject.transform.forward;
            fwdVR.Scale  = 30d;
            fwdVR.Start  = vectorDrawPosition;
            fwdVR.SetLabel("forward");
            fwdVR.Width = 0.01d;
            fwdVR.SetLayer(5);

            upVR.Color  = new Color(0, 1, 0);
            upVR.Vector = selectedInstance.groupCenter.gameObject.transform.up;
            upVR.Scale  = 30d;
            upVR.Start  = vectorDrawPosition;
            upVR.SetLabel("up");
            upVR.Width = 0.01d;

            rightVR.Color  = new Color(1, 0, 0);
            rightVR.Vector = selectedInstance.groupCenter.gameObject.transform.right;
            rightVR.Scale  = 30d;
            rightVR.Start  = vectorDrawPosition;
            rightVR.SetLabel("right");
            rightVR.Width = 0.01d;
        }
        /// <summary>
        /// creates the Vectors for later display
        /// </summary>
        private void SetupVectors()
        {
            // draw vectors
            fwdVR.Color  = new Color(0, 0, 1);
            fwdVR.Vector = selectedObject.gameObject.transform.forward;
            fwdVR.Scale  = 30d;
            fwdVR.Start  = vectorDrawPosition;
            fwdVR.SetLabel("forward");
            fwdVR.Width = 0.01d;
            fwdVR.SetLayer(5);

            upVR.Color  = new Color(0, 1, 0);
            upVR.Vector = selectedObject.gameObject.transform.up;
            upVR.Scale  = 30d;
            upVR.Start  = vectorDrawPosition;
            upVR.SetLabel("up");
            upVR.Width = 0.01d;

            rightVR.Color  = new Color(1, 0, 0);
            rightVR.Vector = selectedObject.gameObject.transform.right;
            rightVR.Scale  = 30d;
            rightVR.Start  = vectorDrawPosition;
            rightVR.SetLabel("right");
            rightVR.Width = 0.01d;

            northVR.Color  = new Color(0.9f, 0.3f, 0.3f);
            northVR.Vector = northVector;
            northVR.Scale  = 30d;
            northVR.Start  = vectorDrawPosition;
            northVR.SetLabel("north");
            northVR.Width = 0.01d;

            eastVR.Color  = new Color(0.3f, 0.3f, 0.9f);
            eastVR.Vector = eastVector;
            eastVR.Scale  = 30d;
            eastVR.Start  = vectorDrawPosition;
            eastVR.SetLabel("east");
            eastVR.Width = 0.01d;
        }