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
0
Question by mohamadjazman981013 · Nov 11, 2018 at 06:04 PM · joystickanalog

analog joystick

hi, i want to make a character dash by using a analog joystick, like move two time analog and then the character dash. how supposed i created or can it be done or cannot.

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
Best Answer

Answer by hectorux · Nov 12, 2018 at 12:05 AM

It can, that make me a headache when i tryed first time, you could get the Input.GetAxis("Horizontal") which in the input editor holds "a", "d", "leftArrow", "rightArrow", "all horizontal left joystic direction from all joystic". with this, you can make your own input, and set something like this:

 if(Input.getAxis("Horizontal")>0.5f && !stoped){
 stoped=true;
 if(timebetweenInputs>Time.time){
 DashFunction();
 }
 timeBetweenInputs=Time.time+timeToWait;
 
 }
 if(Input.getAxis("Horizontal")<0.5f){
 stoped=false;
 }

Comment
Add comment · Show 7 · 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
avatar image mohamadjazman981013 · Nov 12, 2018 at 03:13 AM 0
Share

@hectorux how about double horizontal? , i mean like double move analog joystick

avatar image hectorux mohamadjazman981013 · Nov 12, 2018 at 11:52 AM 0
Share

Unity doesn't have any input for that, you could check if the joystick whnt to 0 or was negative between a certain interval, and if then it becomes more than 0, then it has make a double move. The problem is that xbox controller works with values between -1 to 1, and playstation works with the delta move of the joystick, it gives +0.01 or -0.0856; this makes complicated to make a complete system, because the play will give you changes as deltas, but the xbox will give you the current value of the input

avatar image mohamadjazman981013 hectorux · Nov 12, 2018 at 12:22 PM 0
Share

@hectorux i mean like this, like button we press two time to dash so i want to change the way it and be like move analog joystick to the left or right two time to dash. it is possible to do it.

Show more comments

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

96 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 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 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 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 avatar image avatar image avatar image avatar image

Related Questions

How to smoothly rotate object in direction of analog joystick? 1 Answer

Circular Analog Input? 1 Answer

Animation and joystick Input 1 Answer

How to smoothly rotate a 2d object with analog stick, to look in the same position as the analog stick? 1 Answer

Input System generic USB joystick doesn't have Right Analog Stick 1 Answer


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