Pan and Release Working Together

Ask for help and post bugs.

Pan and Release Working Together

Postby SlaggyWolfie » Mon Jun 04, 2018 4:14 pm

Hi,

I am still new to TouchScript, so I'm wondering if anybody has an idea how to achieve a specific effect: You need to release your touch on an object to select, but also want to pan the camera - so whenever the pointer ends on an object and the pointer is released, it selects, however, it must also work in conjunction with the camera panning, so if you start the pointer on top of the object but move away the pointer and therefore pan the camera, and the pointer is released (and it's not on top of the object anymore), so the object is not selected. And vice versa if you start panning but end on top of an object - it selects (interacts with) the object.

I attempted to get this behaviour with the Fullscreen Layer using the Screen Transform gesture and the Release gesture for the objects but I'm starting to believe a custom gesture would be better. Any ideas?
SlaggyWolfie
 
Posts: 8
Joined: Wed May 23, 2018 5:12 pm

Re: Pan and Release Working Together

Postby SlaggyWolfie » Tue Jun 12, 2018 10:06 pm

Bump.
SlaggyWolfie
 
Posts: 8
Joined: Wed May 23, 2018 5:12 pm

Re: Pan and Release Working Together

Postby SlaggyWolfie » Thu Jun 21, 2018 5:56 pm

Ok, I'm trying to semi-merge the functionality of the Screen Transform Gesture and the Release Gesture - the point being to achieve the effect of clicking on something BUT if you decide to drag/transform whatever (by going over a threshold) it'll cancel the click (in this case the Release) and perform the standard Screen Transform's behaviour.

So to sum it up a Gesture that when Released and that has not had its pointer moved will throw an OnReleased event or something similar, otherwise if it does exit the threshold it'll perform as the Screen Transform Gesture.

I have currently attempted to achieve this by inheriting from TwoPointTransformGestureBase by importing some code from the Release Gesture and the Screen Transform Gesture. Any pointers (no pun intended) on how to proceed?
SlaggyWolfie
 
Posts: 8
Joined: Wed May 23, 2018 5:12 pm


Return to Help and Bugs

Who is online

Users browsing this forum: No registered users and 1 guest