void UpdateTransform() { Vector3 positionInCanvasSpace = mySettings.transform.worldToLocalMatrix.MultiplyPoint3x4(this.transform.parent.position); transform.position = mySettings.CanvasToCurvedCanvas(positionInCanvasSpace); transform.rotation = Quaternion.LookRotation(mySettings.CanvasToCurvedCanvasNormal(transform.parent.localPosition), transform.parent.up); }
// Update is called once per frame void Update() { transform.position = mySettings.CanvasToCurvedCanvas(this.transform.parent.localPosition); transform.rotation = Quaternion.LookRotation(mySettings.CanvasToCurvedCanvasNormal(this.transform.parent.localPosition)); }