雙指向內放大視角,向外縮小視角。現在代碼能夠縮放,但是沒有限制,而且縮放速度很快不知道怎么調
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using HedgehogTeam.EasyTouch;
using UnityEngine.UI;
public class easyTouchTest : MonoBehaviour
{
void OnEnable()
{
EasyTouch.On_Pinch += On_Pinch;
}
void OnDisable()
{
EasyTouch.On_Pinch -= On_Pinch;
}
void OnPinch(Gesture ges){
Camera.main.transform.Translate(new Vector3(0, 0, ges.deltaPinch));
}
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/14039.html
標籤:Unity3D
