效果預覽:
花海(帶移動方向)
VFX 實例
腳本示例 使用TouchScript,計算玩家是否移動,且計算移動方向
using System.Collections;
using System.Collections.Generic;
using TouchScript;
using TouchScript.Pointers;
using UnityEngine;
using UnityEngine.VFX;public class UpdateTouchsParticle : MonoBehaviour
{public GameObject ParticlePrefab;Dictionary<Pointer, GameObject> ParticleDic;void Awake(){//Application.targetFrameRate = 30;}private void OnEnable(){ParticleDic = new Dictionary<Pointer, GameObject>();if (TouchManager.Instance