Exemple #1
0
    //----------------------------------------------------------------------------------------------------------------
    void Update()
    {
        if (!trackEnabled)
        {
            return;
        }

//		if (ctunity.isReplayMode())
        if (!ctunity.trackEnabled || ctunity.isPaused())
        {
            XYplayer.Clear();
            lineR1.positionCount = 0;              // clears old 3D line
            return;
        }

        XYplayer.Enqueue(transform.position);
        while (XYplayer.Count > MaxPts)
        {
            XYplayer.Dequeue();                                     // limit size of queue
        }
//		setLineProps(lineR1, ctclient.myColor, ctclient.myColor);
        lineR1.positionCount = XYplayer.Count;
        lineR1.SetPositions(XYplayer.ToArray());

        // Debug.Log ("lineR1 x: " + xv [xv.Length-1].x + ", y: " + xv [xv.Length-1].y + ", z: " + xv [xv.Length-1].z);
    }
Exemple #2
0
 //----------------------------------------------------------------------------------------------------------------
 void Update()
 //    void FixedUpdate()
 {
     //		Debug.Log(name + ", position: " + transform.localPosition);
     if (trail != null)
     {
         trail.enabled = (ctunity.trackEnabled && !ctunity.isPaused());
     }
     doTrack();
 }