Comments (5)
Hi.
In general you could use TouchPoint.Position which is a coordinate in screen space. But the library was built to abstract from touch points but use gestures and clusters of points instead. All the gestures got ScreenPosition property which is a current centroid of the gesture's cluster on screen.
I don't know if you were the person who asked this at the forums but currently for TapGesture when it's recognized it's not possible to find out where on screen it happened. I'm thinking about how to implement this functionality in a nice way.
As for JavaScript, sorry it doesn't work with JS because of how Unity handles scripts compilation.
from touchscript.
Thanks for the quick response.
So, if i want to rotate an object at the same speed and direction of the touchpoint i'll have to use the Rotate gesture?
from touchscript.
mmm... you mean like if you had a cylinder and tried to rotate it with one figer over its axis? in this case you need to write a modified pan gesture or use pan gesture and compute angle from distance moved manually.
from touchscript.
Thanks, i'll see what comes up.
from touchscript.
Hello again.
Please try the latest develop branch. TapGesture now correctly returns ScreenPosition from Recognized handler.
And there's a new method GetCentroidHitResult which casts a ray from current screen position and returns if it has hit the same target and where.
from touchscript.
Related Issues (20)
- TapGesture.Tapped not working in Android
- 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
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.