Hi,
I am trying to recreate the effect of the block demo. I want to resize/rotate a cube between 2 points (when you pinch). It's possible to share or give a hint on how you created the effect?
a quick try, I shoud do also for the y scale:
Vector3 p1 = new Vector3 (3, -3.55f, 0);
Vector3 p2 = new Vector3 (5.24f, -5.66f, 0);
Vector3 pos = Vector3.Lerp(p1,p2,(float)0.5);
transform.position = pos;
transform.transform.localScale = new Vector3(Vector3.Distance(p1,p2), transform.localScale.y, transform.localScale.z);
also I read that maybe I should use magnitude.
Thanks,
Luciano