void Update()
    {
        age += Time.deltaTime;

        Vector3 offset = AnimMath.SpotOnCircleXZ(radius, age);

        transform.position = target.position + offset;
    }
示例#2
0
    // Update is called once per frame
    void Update()
    {
        age += Time.deltaTime * HUDController.timeScale; // Use timescale with delta time

        Vector3 offset = AnimMath.SpotOnCircleXZ(radius, age);

        // math
        transform.position = target.position + offset;
    }
示例#3
0
    // Update is called once per frame
    void Update()
    {
        Vector3 offset = AnimMath.SpotOnCircleXZ(radius, age, speed);

        transform.position = target.transform.position + offset;
        age  += Time.deltaTime * direction;
        roty += Time.deltaTime * speed;
        transform.rotation = Quaternion.Euler(0, roty, 0);
    }
    // Update is called once per frame
    void Update()
    {
        age += Time.deltaTime * HUDController.timeScale;

        Vector3 offset = AnimMath.SpotOnCircleXZ(age, radius);

        // Math

        transform.position = target.position + offset;
    }
示例#5
0
    // Update is called once per frame
    void Update()
    {
        age += Time.deltaTime;

        //Vector3 offset = new Vector3();
        //offset.x = Mathf.Sin(age) * radius;
        //offset.z = Mathf.Cos(age) * radius;

        Vector3 offset = AnimMath.SpotOnCircleXZ(radius, age);

        transform.position = target.position + offset;
    }
示例#6
0
    void Update()
    {
        // Update the time since last frame multiplied by the speed, and add that to the age.
        age += (speed * Time.deltaTime);

        // Create a vector that moves a point on a radius based on age.
        Vector3 offset = AnimMath.SpotOnCircleXZ(radius, age, sinSkew, sinPosSkew, sinWaveFreq, sinWaveSet, cosSkew, cosPosSkew, cosWaveFreq, cosWaveSet);

        // Using the calculated offset, transform the object
        transform.position = target.position + offset;

        // Manipulate the speed of the moving object
    }