Coder Social home page Coder Social logo

Comments (5)

valyard avatar valyard commented on July 19, 2024

I ran a test and it seems to be fine.
Can you check if IsFriendly() method works?
If nothing helps can you provide an example project where it doesn't work?

from touchscript.

Nubeh avatar Nubeh commented on July 19, 2024

Hi,

IsFriendly becomes true after I run the command, but in the inspector I
don't see the friendly gesture being added. I'm trying to have a tap
gresture and a pan gesture friendly between two 3D objects one behind
the other. Would that work?

from touchscript.

valyard avatar valyard commented on July 19, 2024

It seems that it works just inspector is not updating.

Yes it will work but I don't know how you expect it to work.
If you don't limit tap gesture to movement you can drag object's parent and when you pull fingers off tap will be recognized.

from touchscript.

Nubeh avatar Nubeh commented on July 19, 2024

mmm...in my case I have a camera with a pan gesture on it and a
fullscreen plane to listen to it and I then have some 3D objects with a
tap attached. The problem is that if I try to drag starting from tapping
on such objects then the drag doesn't work, so I wanted to make friendly
features the pan and the tap (which again, are attached to different
objects).

from touchscript.

valyard avatar valyard commented on July 19, 2024

You might be doing it wrong.

Friendly gestures are those which can work together IF they get the same touch points. Gestures can get touch points simultaneously ONLY if they are in the same Transform hierarchy. Read more about it here: http://interactivelab.github.io/TouchScript/tutorials.internals.html

So, for your example to work you need to have a container which you want to be able to pan and all other objects must be children of this container. In this case if you "press" an object the container will also get this touch and if tap gesture and pan gesture are friendly tap gesture will be able to execute. If they aren't pan gesture will always win and disable tap since tap waits for fingers to lift of the surface.

from touchscript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.