Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Mar 08, 2014 at 05:54 PM by Domo23000 for the following reason:

Other

avatar image
0
Question by Domo23000 · Mar 08, 2014 at 04:44 AM · mobiletouchswipe

Samsung Swipe and Touch

I am having trouble understanding swipe and touch input for unity. I have search a lot but I can't find anything that I can understand. Any help is much appreciated.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image nazia08 · Mar 08, 2014 at 05:33 AM 0
Share

I'm trying to help but need to understand what the issue is first. $$anonymous$$aybe you can help me understand what part of it seems like a bit of work?

I ask because you can detect when a touch first happens and when it releases. Given this, you can deter$$anonymous$$e the distance between the two events and divide by the screen width to figure out how far they moved in relation to the resolution.

avatar image whydoidoit nazia08 · Mar 08, 2014 at 05:34 AM 0
Share

Please don't post comments as answers. Answer means solution and not reply. Your comments are also not moderated and appear immediately. I have converted it on this occasion.

avatar image Domo23000 · Mar 08, 2014 at 06:00 AM 0
Share

What i need is to have a button, that you can press @nazia08 . im making a game where you press an up or down arrow to jump or duck. thanks!

1 Reply

  • Sort: 
avatar image
0

Answer by hahasoftware · Mar 08, 2014 at 10:04 AM

Have you tried looking at the unity documentation to get a basic idea of what is going on? For the most part touch is equal to mouse clicks (its easier to think about it like this) as long as you are only thinking about one touch. Since its possible to do multiple touches/fingers at once unity uses an array to hold the touch's. If you are just looking for example code on how to handle something like swipes then maybe try out this link http://forum.unity3d.com/threads/48601-Swipe-help-please?highlight=swipe The 4th post down helped me get swipes working in my code. I find that just pasting random code in and playing around with it until i see what everything does usually helps. Anything I don't understand at all I just lookup in the documentation or google for some extra help.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

23 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Move object using swipe control for mobile 2 Answers

Swipe controls error "Cannot implicitly convert type 'UnityEngine.Touch' to 'Touch' " 1 Answer

Swipe and Joystick Together on Mobile 0 Answers

How to accept swipe input when already touching with one finger. 0 Answers

mouse input to touch input help please 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges