In my game I want to create a platform when the player will touch the screen; (touching the screen)the platform’s size will be from where the touch starts to where the touch ends. After the player ends the touch(lifts his finger from the screen ) the platform will be created. I have uploaded a file(expert drawing) for your convenience
-get initial position when touchDown.
-position of object during drag is middle point of initial position and finger position
use Vector3.Lerp(initialPos, fingerPos, 0.5f) to get center position.
-\X scale of object during drag is distance b/w initial position and finger position
which you can get by “Mathf.Abs(initialPos.x-fingerPos.x)”