Пример #1
0
    void moving(Vector3 vector3POS)
    {
        x = x + (vector3POS.x - x) * easeingValue;
        //   y += (vector3POS.y - y) * .125F;
        //        z += (vector3POS.z - z) * 0.033f;

        Vector3 target = new Vector3(x * Scale, y, this.transform.position.z);

        transform.position = target;


        float lightx = withUDPMessage.Maping(target.x, withUDPMessage.OutputMin, withUDPMessage.OutputMax, -140, 140, false);


        Vector3 lightPos = new Vector3(lightx, lightTrans.localPosition.y, lightTrans.localPosition.z);

        lightTrans.localPosition = lightPos;

        //perviousX = vector3POS.x;
    }