Comments (6)
Sorry, I don't get what you are trying to do.
Can you describe what objects you got and what behaviour you want?
Like 1. I press here 2. I move fingers there 3. I expect this to happen.
Thanks.
from touchscript.
You are right, I wasn't very specific. Just read it again, what I was trying to say:
I have several instanced prefabs with the same behaviour in a scene. I want them to trigger their delegates, if I swipe over them. For example, I press somewhere on the screen and then start to move my finger arround, If I hit any object in the process it should respond to my input.
I tried all implemented Gestures and did not check against their GestureState to see, if something triggers. But the way I did it only when I startetd tapping/pressing/swiping on an object, only the first one reacted after I was done with the Gesture.
from touchscript.
I see.
The problem is that to recieve touch events an object HAS to be one with a collider a touch hit. You can't start a touch over one object and transfer it to another one. You will need to group these objects into a common container and add a custom Gesture to it.
This gesture will recieve touches from all the prefabs but to get touches which didn't hit them you'll need to place a bigger collider on this container. For example this is what FullScreenTarget script does. It places a collider it the far plane of a camera.
If you got a global collider you will have to add custom collision logic to this new Gesture.
If you are not very familiar with c# programming or scripting in general and got time to wait I can code such a gesture and add it as an example to the site in the beginning of the next week.
from touchscript.
I think you would be much faster and more efficient in coding the sample. If you don't find the time I would go deeper into the framework and try to find out how a custom Gesture is set up.
Thanks in Advance,
If it accounts for anything, this is worth a 5-Star rating in the store.
from touchscript.
Hey,
did not hear anything new, so I guess you are not set up to code on an example? I checked out the dev-branch and the related dependencies. Builds like a charm.
So, I would built a class in the library implementing the gesture interface. I am not familiar with the used libs and still not making much of a progress.
from touchscript.
Sorry, in the middle of a tight deadline at the moment.
For your problem try doing the following: create an object with big collider, add your smaller objects to it so that this big collider overlaps them and gets all the touches, make a custom gesture (or use MetaGesture) and add it to the container object. In this gesture you can test every active touch casting rays and ignoring the big collider to get to small ones and check whether touch points intersect them.
from touchscript.
Related Issues (20)
- Camera Control
- Initial touch down on UI Slider sets Slider.value to 0 HOT 1
- Scaling an object
- Tap Gesture Not Working on WebGL (mobile only)
- Update Old Hyperlinks in `Gestures` Wiki article
- Pointers not being removed/cancelled using TUIO input HOT 5
- Triggering overlapping colliders at the same time with one click?
- Pointer.GetOverData(false) return Wrong Target
- Unity Crashes when i click on the TouchManager prefab
- Touch Detection on Multi Display Window Application HOT 1
- I can't touch on surface pro 7
- TouchScript multiple displays with tuio HOT 2
- Transforming an object without the need to touch it beforehand HOT 1
- How to receive only the raw touches that land within an object? HOT 1
- out of virtual finger IDs
- TUIO Input extra poitner issues HOT 1
- Mac osx touchpad support
- The order of the layers
- Touch duplication HOT 2
- Rotation and Scaling not working in Windows build.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from touchscript.