Hi, all,
Does anyone have a good example of a swipe to move script? I searched the forum and cobbled something together from a raycast / touch script, but had little success. I’m looking to move my camera in the direction of the swipe gesture.
Thanks,
Greg
If you’re trying to move the Camera in the direction of the swipe. Just use positionDelta of iPhoneTouch.
Something alone the lines of…
void Update()
{
for (int i = 0; i < iPhoneInput.touchCount; i++)
{
iPhoneTouch touch = iPhoneInput.GetTouch(i);
if (touch.phase == iPhoneTouchPhase.Moved)
{
x += touch.positionDelta.x;
y += -(touch.positionDelta.y);
.....
Thanks, Kevin, that was very helpful, now I’m on the right track. Also,thanks for posting Vong- it has been extremely useful and is an invaluable learning tool for me.
Best,
Greg