Example #1
0
    // Update is called once per frame
    void Update()
    {
        if (timeCounter < Settings.duration)
        {
            timeCounter += Time.deltaTime;

            if (isFirstFrame)
            {
                timeCounter  = 0;
                isFirstFrame = false;
            }

            positionRecorder.writePositionForTime(transform.position, timeCounter);
        }
    }
Example #2
0
    // Update is called once per frame
    void Update()
    {
        if (timeCounter < Settings.duration)
        {
            timeCounter += Time.deltaTime;

            if (isFirstFrame)
            {
                timeCounter  = 0;
                isFirstFrame = false;
            }

            listenerPos = listener.position;
            relativePos = transform.position - listenerPos;

            positionRecorder.writePositionForTime(relativePos, timeCounter);
        }
    }