Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
avatar image
1
Question by cadpeople · Oct 29, 2015 at 08:23 PM · guitouchwebglwindows 7

Windows 7 touch not working correctly in WebGL!

I'm creating a touch controlled application on Windows 7. I've met a simple problem, which probably does not have a simple solution... When I build the application as a standalone exe, the touch input works as expected - The same way it works if I build it to a mobile device. The problem is, I need to build it to WebGL in it's final form, but when I build it to WebGL, uGui does not respond to touch input and general touch input does not act as expected. It's almost like Unity is always detecting an extra "ghost" input! As a "solution", I've tried implementing the TouchScript plugin, but while uGUI "works" (Vertical touch input is reversed), other touch input gestures do not. Not even in TouchScripts own examples. I've also tried simply using mouse input instead, as the app is running on a pc, but no luck.

UPDATE: I created a new Unity project and simply printed debug information to a UI text. My results:

Chrome

  • Touch count: Starts as zero, and outputs the correct amount of touches, as well as their correct delta positions. However, when all fingers are released, it still registers one touch input, confirming my "ghost touch" theory.

  • Mouse input: No mouse input registered from touch, but correctly registered if a mouse is plugged in and used.

Firefox

  • Touch count: None! In Firefox no touch is registered at all! Instead,a single touch is registered as a click of the left mouse button, but is immediatly unregistered. AKA: Holding down a finger, does nothing.

  • Mouse input: Registers mouse input as normal. Any ideas? I really need this solved quickly, but I've got no more ideas.

UPDATE: This thread and this thread describe part of the issue(s) - Supposedly fixed in 5.3. Whether that's the case or not, I can't wait for 5.3 to be released. I'm going to try the 5.4 beta, but as of this moment, trying to download the WebGL tools for the beta, returns a server error.

UPDATE: Okay so current "solution" is to go back to Unity Web Player. Using an old version of Chrome it all seems to work! However (As talked about in this thread I can't show HTML over top of the player in Chrome. But I can in Firefox, but... Firefox doesn't register touch input?! Touch registers as a mouse click...

One step forwards, one step back...

UPDATE: Taking the current mouse position minus the previous position, I am back to being able to drag my finger across, despite mouse axis' not registrering. Next problem. The HTML overlay works only until the web player is first "clicked" (activated), after which the html overlay no longer accepts input, it is captured by the player behind it. My latest attempt at overcoming this, is to call Cursor.lockState = CursorLockMode.None; every frame, but no luck. Why doesn't that work...

LATER UPDATE: If anyone was curious, I solved this by downgrading Firefox to version 42.0 and disabling updates. Then switching to WebPlayer, and building the project in a resolution, that doesn't overlap with the HTML elements. Time and budget permitting, I will try WebGL at a later date in version 5.3 and above.

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by prinzwurstbrot · Dec 26, 2015 at 11:12 AM

Have you tried getting the touch event in html and forward that data to your function (mouseOrbit or similar) using send message. That was once a workaround for mac because safari blocked all whe mouse wheel input events.

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

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Touch in WebGL on Windows, STILL broken? 2 Answers

Assigning special Keyboard to GUI.TextField 0 Answers

UI Slider - making the touch area for slide larger than the UI image handle 2 Answers

[closed]OnClick with touch 1 Answer

Is there a way to toggle between active characters via a GUI? 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