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 Jan 21, 2014 at 02:18 AM by Benproductions1 for the following reason:

Duplicate Question

avatar image
-1
Question by Developerx · Jan 20, 2014 at 11:40 PM · androidrotationmonodevelopconverttouchscreen

I need help converting this script to touchscreen

I am trying to develop a JavaScript that will allow me to rotate the character in z axis by swiping left and right android

 // Smoothly tilts a transform towards a target rotation.     
 var smooth = 2.0;     
 var tiltAngle = 30.0;     
 function Update () {         
 var tiltAroundZ = Input.GetAxis("Horizontal") * tiltAngle;         
 var tiltAroundX = Input.GetAxis("Vertical") * tiltAngle;         
 var target = Quaternion.Euler (tiltAroundX, 0, tiltAroundZ);         
 // Dampen towards the target rotation         
 transform.rotation = Quaternion.Slerp(transform.rotation, target,         
  Time.deltaTime * smooth);;     }
Comment
Add comment · Show 5
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 MakinStuffLookGood · Jan 21, 2014 at 02:12 AM 0
Share

You haven't asked a question. What do you mean by "converting this script to tou"?

avatar image Benproductions1 · Jan 21, 2014 at 02:18 AM 1
Share
  1. Javascript is a language, there is only one of them! You can't say "A Javascript", only "The Javascript"

  2. Unity's Javascript is called UnityScript.

  3. WTF is "tou"?

  4. There are a TON of tutorials out there for converting scripts!

  5. As @Broxxar said... where is the question?

avatar image robertbu · Jan 21, 2014 at 02:23 AM 0
Share

@Benproductions1 - I think 'tou' is 'touch'.

avatar image sdgd · Jan 30, 2014 at 12:38 AM 0
Share

@Benproductions1 can you unlock this post as it has properly formatted code and close the other one?

also? @Developerx what's wrong with this Question that you had to create 3. Question like this SA$$anonymous$$E!!!?

avatar image Benproductions1 · Jan 30, 2014 at 07:31 AM 1
Share

None the less there are many posts concerned with making scripts that work on mobile and "converting" between the different input variations. It also seems (purely because of the lack of care the OP has given either of his questions) that he is just asking for others to do it for him.
Although the other question doesn't have formatted code, it does have a comment that answers the question, so I'll be leaving this one closed for now and the other one open :)

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

21 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

Related Questions

I need help making this script work for android touchscreen 0 Answers

How to use correctly IsPointerOverGameObject with two differen gameObjects ? 1 Answer

How to get position of touch on touch screen 1 Answer

rotation to axis conversion problem? 1 Answer

Input.gyro.attitude not working on newer Android devices 3 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