【3D技术宅公社】XR数字艺术论坛  XR技术讨论 XR互动电影 定格动画

 找回密码
 立即注册

QQ登录

只需一步,快速开始

调查问卷
论坛即将给大家带来全新的技术服务,面向三围图形学、游戏、动画的全新服务论坛升级为UTF8版本后,中文用户名和用户密码中有中文的都无法登陆,请发邮件到324007255(at)QQ.com联系手动修改密码

3D技术论坛将以计算机图形学为核心,面向教育 推出国内的三维教育引擎该项目在持续研发当中,感谢大家的关注。

查看: 3148|回复: 0

[体感与外设] unity3d FingerGestures 单点 多点触摸 手势

[复制链接]
发表于 2013-5-1 21:56:51 | 显示全部楼层 |阅读模式
FingerGestures最大的好处就是结合unity3d进行多点触控,手势识别,编写一次代码 ,通过配置来进行多平台发布FingerGestures提供了3种不同的方法来检测由用户执行的拖动手势。
  • [color=#02bb8 !important]方法1:使用默认的手势事件
    • 每个手指的手势事件:为每个单独的手指,独立的状态
      • OnFingerTap
      • OnFingerDoubleTap
      • OnFingerSwipe
      • OnFingerLongPress
      • OnFingerDragBegin,OnFingerDragMove,OnFingerDragEnd
    • 全局手势事件:
      • 一个手指触摸屏幕上:
        • OnTAP
        • OnDoubleTap
        • OnSwipe
        • OnLongPress
        • OnDragBegin,OnDragMove,OnDragEnd
      • 两个手指触摸屏幕时:
        • OnPinchBegin,OnPinchMove,OnPinchEnd
        • OnRotationBegin,OnRotationMove,OnRotationEnd
        • OnTwoFingerTap
        • OnTwoFingerSwipe
        • OnTwoFingerLongPress
        • OnTwoFingerDragBegin,OnTwoFingerDragMove,OnTwoFingerDragEnd


  • [color=#02bb8 !important]方法2:使用一个DragGestureRecognizer
  • [color=#02bb8 !important]方法3:使用“工具箱”
    工具箱是一种更高级方便的方式,设计的理念是开箱就用,包括了很多脚本,但是没有涉及到核心源码,所以不用的话  可以把这个包直接删掉


FingerGestures  的事件注册是基于c#的,性能还是可以
2485705519349609659.jpg
FingerGestures is a scripting package forUnity that lets you easily detect and react to common input gesturesperformed with either a mouse or a touch screen device, using one ormore fingers.
Main Features
  • Single and multi-finger gesture recognizers for Drag, Tap, Swipe, Long-Press, Pinch, Rotate
  • Finger events: Down, Up, Move, Stationary
  • An easy and smooth integration with Unity’s workflow
  • A straightforward and streamlined event-driven API to quickly get started without digging too deep
  • A rich and powerful object-oriented gesture framework for maximum control
  • An efficient, low memory usage implementation
  • Finger/Touch abstraction: mouse and touchscreen inputs go through the same pipe!
  • A Toolbox packed with no-coding-required & ready-to-use scripts including:
  • Drag & drop system
  • Smooth orbit camera using drag and pinch gestures to rotate, zoom and pan
  • Pinch-Zoom camera
Several easy-to-follow sample scenes that will progressively introduce you to the libraryWorks on desktop, iOS and Android platformsSupport for both Javascript and C#Includes full C# source code with comments and online documentation

转自http://cl314413.blog.163.com/blog/static/19050797620127292023453/

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|3D数字艺术论坛 ( 沪ICP备14023054号 )

GMT+8, 2024-5-5 22:33

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表