Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //create vars for objects touched
- var speed : float = 0.1;
- var detectingMotion: boolean;
- private var hit: RaycastHit;
- private var touchedObject: Transform;
- private var xyPlane: Plane;
- private var beingDragged : Draggable;
- private var trail : Array;
- function Start()
- {
- xyPlane = new Plane(Vector3.up, Vector3.zero);
- }
- function Update ()
- {
- if (iPhoneInput.touchCount >= 1)
- {
- touch = iPhoneInput.touch[0];
- if (touch.phase == iPhoneTouchPhase.Began)
- {
- ///touch began event
- }
- if (touch.phase == iPhoneTouchPhase.Moved && detectingMotion == true)
- {
- ////touch moved event
- }
- if (touch.phase == iPhoneTouchPhase.Ended)
- {
- ///touch ended event
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment